You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2022/09/15 12:40:26 UTC

[GitHub] [openwhisk-deploy-kube] style95 commented on a diff in pull request #729: Deploy with new scheduler

style95 commented on code in PR #729:
URL: https://github.com/apache/openwhisk-deploy-kube/pull/729#discussion_r971917119


##########
helm/openwhisk/templates/scheduler-pod.yaml:
##########
@@ -0,0 +1,273 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+{{- if .Values.scheduler.enable }}
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+  name: {{ .Release.Name }}-scheduler
+  labels:
+    name: {{ .Release.Name }}-scheduler
+{{ include "openwhisk.label_boilerplate" . | indent 4 }}
+spec:
+  serviceName: {{ .Release.Name }}-scheduler
+  podManagementPolicy: "Parallel"
+  replicas: {{ .Values.scheduler.replicaCount }}
+  selector:
+    matchLabels:
+      name: {{ .Release.Name }}-scheduler
+  template:
+    metadata:
+      labels:
+        name: {{ .Release.Name }}-scheduler
+{{ include "openwhisk.label_boilerplate" . | indent 8 }}
+
+      {{- if .Values.metrics.prometheusEnabled }}
+      annotations:
+        prometheus.io/scrape: 'true'
+        prometheus.io/port:   '{{ .Values.scheduler.port }}'
+      {{- end }}
+
+    spec:
+      serviceAccountName: {{ .Release.Name }}-core
+      restartPolicy: {{ .Values.scheduler.restartPolicy }}
+
+      {{- if .Values.affinity.enabled }}
+      affinity:
+{{ include "openwhisk.affinity.core" . | indent 8 }}
+{{ include "openwhisk.affinity.selfAntiAffinity" ( printf "%s-scheduler" .Release.Name ) | indent 8 }}
+      {{- end }}
+
+      {{- if .Values.toleration.enabled }}
+      tolerations:
+{{ include "openwhisk.toleration.core" . | indent 8 }}
+      {{- end }}
+
+      initContainers:
+      # The scheduler must wait for kafka and/or couchdb to be ready before it starts
+{{ include "openwhisk.readiness.waitForController" . | indent 6 }}
+{{ include "openwhisk.docker.imagePullSecrets" . | indent 6 }}
+
+      containers:
+      - name: scheduler
+        imagePullPolicy: {{ .Values.scheduler.imagePullPolicy | quote }}
+        image: "{{- .Values.docker.registry.name -}}{{- .Values.scheduler.imageName -}}:{{- .Values.scheduler.imageTag -}}"
+        command: ["/bin/bash", "-c", "/init.sh `hostname | awk -F '-' '{print $NF}'`"]
+        ports:
+        - name: scheduler
+          containerPort: {{ .Values.scheduler.port }}
+        - name: rpc
+          containerPort: {{ .Values.scheduler.rpcPort }}
+        - name: akka-remoting
+          containerPort: 25520
+        - name: akka-mgmt-http
+          containerPort: 19999
+        livenessProbe:
+          httpGet:
+            path: "/ping"
+            port: {{ .Values.scheduler.port }}
+            scheme: "HTTP"
+          initialDelaySeconds: {{ .Values.probes.scheduler.livenessProbe.initialDelaySeconds }}
+          periodSeconds: {{ .Values.probes.scheduler.livenessProbe.periodSeconds }}
+          timeoutSeconds: {{ .Values.probes.scheduler.livenessProbe.timeoutSeconds }}
+        readinessProbe:
+          httpGet:
+            path: "/ping"
+            port: {{ .Values.scheduler.port }}
+            scheme: "HTTP"
+          initialDelaySeconds: {{ .Values.probes.scheduler.readinessProbe.initialDelaySeconds }}
+          periodSeconds: {{ .Values.probes.scheduler.readinessProbe.periodSeconds }}
+          timeoutSeconds: {{ .Values.probes.scheduler.readinessProbe.timeoutSeconds }}
+        env:

Review Comment:
   I think the `whick_cluster_name` needs to be added to differentiate different versions of clusters.
   https://github.com/apache/openwhisk/blob/master/ansible/roles/schedulers/tasks/deploy.yml#L223



##########
docs/configurationChoices.md:
##########
@@ -180,6 +190,8 @@ k8s:
     enabled: false
 ```
 
+Currently, etcd persistence is not supported.

Review Comment:
   👍 
   
   It is recommended to run ETCD on physical machines with SSD.
   



##########
helm/openwhisk/templates/scheduler-pod.yaml:
##########
@@ -0,0 +1,273 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+{{- if .Values.scheduler.enable }}
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+  name: {{ .Release.Name }}-scheduler
+  labels:
+    name: {{ .Release.Name }}-scheduler
+{{ include "openwhisk.label_boilerplate" . | indent 4 }}
+spec:
+  serviceName: {{ .Release.Name }}-scheduler
+  podManagementPolicy: "Parallel"
+  replicas: {{ .Values.scheduler.replicaCount }}
+  selector:
+    matchLabels:
+      name: {{ .Release.Name }}-scheduler
+  template:
+    metadata:
+      labels:
+        name: {{ .Release.Name }}-scheduler
+{{ include "openwhisk.label_boilerplate" . | indent 8 }}
+
+      {{- if .Values.metrics.prometheusEnabled }}
+      annotations:
+        prometheus.io/scrape: 'true'
+        prometheus.io/port:   '{{ .Values.scheduler.port }}'
+      {{- end }}
+
+    spec:
+      serviceAccountName: {{ .Release.Name }}-core
+      restartPolicy: {{ .Values.scheduler.restartPolicy }}
+
+      {{- if .Values.affinity.enabled }}
+      affinity:
+{{ include "openwhisk.affinity.core" . | indent 8 }}
+{{ include "openwhisk.affinity.selfAntiAffinity" ( printf "%s-scheduler" .Release.Name ) | indent 8 }}
+      {{- end }}
+
+      {{- if .Values.toleration.enabled }}
+      tolerations:
+{{ include "openwhisk.toleration.core" . | indent 8 }}
+      {{- end }}
+
+      initContainers:
+      # The scheduler must wait for kafka and/or couchdb to be ready before it starts
+{{ include "openwhisk.readiness.waitForController" . | indent 6 }}

Review Comment:
   Should this be `waitForKafka` and `waitForCouchDB`?



##########
helm/openwhisk/templates/scheduler-pod.yaml:
##########
@@ -0,0 +1,273 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+{{- if .Values.scheduler.enable }}
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+  name: {{ .Release.Name }}-scheduler
+  labels:
+    name: {{ .Release.Name }}-scheduler
+{{ include "openwhisk.label_boilerplate" . | indent 4 }}
+spec:
+  serviceName: {{ .Release.Name }}-scheduler
+  podManagementPolicy: "Parallel"
+  replicas: {{ .Values.scheduler.replicaCount }}
+  selector:
+    matchLabels:
+      name: {{ .Release.Name }}-scheduler
+  template:
+    metadata:
+      labels:
+        name: {{ .Release.Name }}-scheduler
+{{ include "openwhisk.label_boilerplate" . | indent 8 }}
+
+      {{- if .Values.metrics.prometheusEnabled }}
+      annotations:
+        prometheus.io/scrape: 'true'
+        prometheus.io/port:   '{{ .Values.scheduler.port }}'
+      {{- end }}
+
+    spec:
+      serviceAccountName: {{ .Release.Name }}-core
+      restartPolicy: {{ .Values.scheduler.restartPolicy }}
+
+      {{- if .Values.affinity.enabled }}
+      affinity:
+{{ include "openwhisk.affinity.core" . | indent 8 }}
+{{ include "openwhisk.affinity.selfAntiAffinity" ( printf "%s-scheduler" .Release.Name ) | indent 8 }}
+      {{- end }}
+
+      {{- if .Values.toleration.enabled }}
+      tolerations:
+{{ include "openwhisk.toleration.core" . | indent 8 }}
+      {{- end }}
+
+      initContainers:
+      # The scheduler must wait for kafka and/or couchdb to be ready before it starts
+{{ include "openwhisk.readiness.waitForController" . | indent 6 }}
+{{ include "openwhisk.docker.imagePullSecrets" . | indent 6 }}
+
+      containers:
+      - name: scheduler
+        imagePullPolicy: {{ .Values.scheduler.imagePullPolicy | quote }}
+        image: "{{- .Values.docker.registry.name -}}{{- .Values.scheduler.imageName -}}:{{- .Values.scheduler.imageTag -}}"
+        command: ["/bin/bash", "-c", "/init.sh `hostname | awk -F '-' '{print $NF}'`"]
+        ports:
+        - name: scheduler
+          containerPort: {{ .Values.scheduler.port }}
+        - name: rpc
+          containerPort: {{ .Values.scheduler.rpcPort }}
+        - name: akka-remoting
+          containerPort: 25520
+        - name: akka-mgmt-http
+          containerPort: 19999
+        livenessProbe:
+          httpGet:
+            path: "/ping"
+            port: {{ .Values.scheduler.port }}
+            scheme: "HTTP"
+          initialDelaySeconds: {{ .Values.probes.scheduler.livenessProbe.initialDelaySeconds }}
+          periodSeconds: {{ .Values.probes.scheduler.livenessProbe.periodSeconds }}
+          timeoutSeconds: {{ .Values.probes.scheduler.livenessProbe.timeoutSeconds }}
+        readinessProbe:
+          httpGet:
+            path: "/ping"
+            port: {{ .Values.scheduler.port }}
+            scheme: "HTTP"
+          initialDelaySeconds: {{ .Values.probes.scheduler.readinessProbe.initialDelaySeconds }}
+          periodSeconds: {{ .Values.probes.scheduler.readinessProbe.periodSeconds }}
+          timeoutSeconds: {{ .Values.probes.scheduler.readinessProbe.timeoutSeconds }}
+        env:
+        - name: "PORT"
+          value: {{ .Values.scheduler.port | quote }}
+
+        - name: "POD_IP"
+          valueFrom:
+            fieldRef:
+              fieldPath: status.podIP
+
+        - name: "WHISK_SCHEDULER_ENDPOINTS_RPCPORT"
+          value: {{ .Values.scheduler.rpcPort | quote }}
+
+        - name: "WHISK_SCHEDULER_ENDPOINTS_AKKAPORT"
+          value: "25520"

Review Comment:
   Would be great to make this configurable.
   



##########
helm/openwhisk/templates/scheduler-pod.yaml:
##########
@@ -0,0 +1,273 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+{{- if .Values.scheduler.enable }}
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+  name: {{ .Release.Name }}-scheduler
+  labels:
+    name: {{ .Release.Name }}-scheduler
+{{ include "openwhisk.label_boilerplate" . | indent 4 }}
+spec:
+  serviceName: {{ .Release.Name }}-scheduler
+  podManagementPolicy: "Parallel"
+  replicas: {{ .Values.scheduler.replicaCount }}
+  selector:
+    matchLabels:
+      name: {{ .Release.Name }}-scheduler
+  template:
+    metadata:
+      labels:
+        name: {{ .Release.Name }}-scheduler
+{{ include "openwhisk.label_boilerplate" . | indent 8 }}
+
+      {{- if .Values.metrics.prometheusEnabled }}
+      annotations:
+        prometheus.io/scrape: 'true'
+        prometheus.io/port:   '{{ .Values.scheduler.port }}'
+      {{- end }}
+
+    spec:
+      serviceAccountName: {{ .Release.Name }}-core
+      restartPolicy: {{ .Values.scheduler.restartPolicy }}
+
+      {{- if .Values.affinity.enabled }}
+      affinity:
+{{ include "openwhisk.affinity.core" . | indent 8 }}
+{{ include "openwhisk.affinity.selfAntiAffinity" ( printf "%s-scheduler" .Release.Name ) | indent 8 }}
+      {{- end }}
+
+      {{- if .Values.toleration.enabled }}
+      tolerations:
+{{ include "openwhisk.toleration.core" . | indent 8 }}
+      {{- end }}
+
+      initContainers:
+      # The scheduler must wait for kafka and/or couchdb to be ready before it starts
+{{ include "openwhisk.readiness.waitForController" . | indent 6 }}
+{{ include "openwhisk.docker.imagePullSecrets" . | indent 6 }}
+
+      containers:
+      - name: scheduler
+        imagePullPolicy: {{ .Values.scheduler.imagePullPolicy | quote }}
+        image: "{{- .Values.docker.registry.name -}}{{- .Values.scheduler.imageName -}}:{{- .Values.scheduler.imageTag -}}"
+        command: ["/bin/bash", "-c", "/init.sh `hostname | awk -F '-' '{print $NF}'`"]
+        ports:
+        - name: scheduler
+          containerPort: {{ .Values.scheduler.port }}
+        - name: rpc
+          containerPort: {{ .Values.scheduler.rpcPort }}
+        - name: akka-remoting
+          containerPort: 25520
+        - name: akka-mgmt-http
+          containerPort: 19999
+        livenessProbe:
+          httpGet:
+            path: "/ping"
+            port: {{ .Values.scheduler.port }}
+            scheme: "HTTP"
+          initialDelaySeconds: {{ .Values.probes.scheduler.livenessProbe.initialDelaySeconds }}
+          periodSeconds: {{ .Values.probes.scheduler.livenessProbe.periodSeconds }}
+          timeoutSeconds: {{ .Values.probes.scheduler.livenessProbe.timeoutSeconds }}
+        readinessProbe:
+          httpGet:
+            path: "/ping"
+            port: {{ .Values.scheduler.port }}
+            scheme: "HTTP"
+          initialDelaySeconds: {{ .Values.probes.scheduler.readinessProbe.initialDelaySeconds }}
+          periodSeconds: {{ .Values.probes.scheduler.readinessProbe.periodSeconds }}
+          timeoutSeconds: {{ .Values.probes.scheduler.readinessProbe.timeoutSeconds }}
+        env:

Review Comment:
   The `scheduling` configurations are required.
   
   ```
         "CONFIG_whisk_scheduler_scheduling_staleThreshold": "{{ scheduler.scheduling.staleThreshold }}"
         "CONFIG_whisk_scheduler_scheduling_checkInterval": "{{ scheduler.scheduling.checkInterval }}"
         "CONFIG_whisk_scheduler_scheduling_dropInterval": "{{ scheduler.scheduling.dropInterval }}"
   ```
   https://github.com/apache/openwhisk/blob/master/ansible/roles/schedulers/tasks/deploy.yml#L117



##########
helm/openwhisk/templates/scheduler-pod.yaml:
##########
@@ -0,0 +1,273 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+{{- if .Values.scheduler.enable }}
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+  name: {{ .Release.Name }}-scheduler
+  labels:
+    name: {{ .Release.Name }}-scheduler
+{{ include "openwhisk.label_boilerplate" . | indent 4 }}
+spec:
+  serviceName: {{ .Release.Name }}-scheduler
+  podManagementPolicy: "Parallel"
+  replicas: {{ .Values.scheduler.replicaCount }}
+  selector:
+    matchLabels:
+      name: {{ .Release.Name }}-scheduler
+  template:
+    metadata:
+      labels:
+        name: {{ .Release.Name }}-scheduler
+{{ include "openwhisk.label_boilerplate" . | indent 8 }}
+
+      {{- if .Values.metrics.prometheusEnabled }}
+      annotations:
+        prometheus.io/scrape: 'true'
+        prometheus.io/port:   '{{ .Values.scheduler.port }}'
+      {{- end }}
+
+    spec:
+      serviceAccountName: {{ .Release.Name }}-core
+      restartPolicy: {{ .Values.scheduler.restartPolicy }}
+
+      {{- if .Values.affinity.enabled }}
+      affinity:
+{{ include "openwhisk.affinity.core" . | indent 8 }}
+{{ include "openwhisk.affinity.selfAntiAffinity" ( printf "%s-scheduler" .Release.Name ) | indent 8 }}
+      {{- end }}
+
+      {{- if .Values.toleration.enabled }}
+      tolerations:
+{{ include "openwhisk.toleration.core" . | indent 8 }}
+      {{- end }}
+
+      initContainers:
+      # The scheduler must wait for kafka and/or couchdb to be ready before it starts
+{{ include "openwhisk.readiness.waitForController" . | indent 6 }}
+{{ include "openwhisk.docker.imagePullSecrets" . | indent 6 }}
+
+      containers:
+      - name: scheduler
+        imagePullPolicy: {{ .Values.scheduler.imagePullPolicy | quote }}
+        image: "{{- .Values.docker.registry.name -}}{{- .Values.scheduler.imageName -}}:{{- .Values.scheduler.imageTag -}}"
+        command: ["/bin/bash", "-c", "/init.sh `hostname | awk -F '-' '{print $NF}'`"]
+        ports:
+        - name: scheduler
+          containerPort: {{ .Values.scheduler.port }}
+        - name: rpc
+          containerPort: {{ .Values.scheduler.rpcPort }}
+        - name: akka-remoting
+          containerPort: 25520
+        - name: akka-mgmt-http
+          containerPort: 19999
+        livenessProbe:
+          httpGet:
+            path: "/ping"
+            port: {{ .Values.scheduler.port }}
+            scheme: "HTTP"
+          initialDelaySeconds: {{ .Values.probes.scheduler.livenessProbe.initialDelaySeconds }}
+          periodSeconds: {{ .Values.probes.scheduler.livenessProbe.periodSeconds }}
+          timeoutSeconds: {{ .Values.probes.scheduler.livenessProbe.timeoutSeconds }}
+        readinessProbe:
+          httpGet:
+            path: "/ping"
+            port: {{ .Values.scheduler.port }}
+            scheme: "HTTP"
+          initialDelaySeconds: {{ .Values.probes.scheduler.readinessProbe.initialDelaySeconds }}
+          periodSeconds: {{ .Values.probes.scheduler.readinessProbe.periodSeconds }}
+          timeoutSeconds: {{ .Values.probes.scheduler.readinessProbe.timeoutSeconds }}
+        env:

Review Comment:
   Similarly, would be great to add `kafka_topic_prefix` too.
   https://github.com/apache/openwhisk/blob/master/ansible/roles/schedulers/tasks/deploy.yml#L150
   
   BTW, it seems the prefix configuration for kafka topic is not applied in this repo at all.
   



##########
helm/openwhisk/values.yaml:
##########
@@ -249,20 +255,69 @@ nginx:
 # Controller configurations
 controller:
   imageName: "openwhisk/controller"
-  imageTag: "c5970a6"
+  imageTag: "a1639f0"
+  imagePullPolicy: "IfNotPresent"
+  replicaCount: 1
+  restartPolicy: "Always"
+  port: 8080
+  options: ""
+  jvmHeapMB: "1024"
+  jvmOptions: ""
+  loglevel: "INFO"
+
+# Scheduler configurations
+scheduler:
+  enable: true

Review Comment:
   +1 to David's opinion.
   
   We may take the same approach with the core repo.
   <img width="1091" alt="image" src="https://user-images.githubusercontent.com/3447251/190398762-83320684-d6a0-4c2d-a5c1-bb732b5e1643.png">
   
   It has a dedicated CI pipeline for the new scheduler.



##########
tools/travis/deploy-chart.sh:
##########
@@ -216,12 +216,17 @@ if [ "${OW_LEAN_MODE:-false}" == "false" ]; then
   # Wait for the controller to confirm that it has at least one healthy invoker
   verifyHealthyInvoker
 
+  # Wait for scheduler to be up
+  statefulsetHealthCheck "ow4travis-scheduler"

Review Comment:
   If we would not actually invoke a health action, I think it would be enough to go.



##########
helm/openwhisk/templates/scheduler-pod.yaml:
##########
@@ -0,0 +1,273 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+{{- if .Values.scheduler.enable }}
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+  name: {{ .Release.Name }}-scheduler
+  labels:
+    name: {{ .Release.Name }}-scheduler
+{{ include "openwhisk.label_boilerplate" . | indent 4 }}
+spec:
+  serviceName: {{ .Release.Name }}-scheduler
+  podManagementPolicy: "Parallel"
+  replicas: {{ .Values.scheduler.replicaCount }}
+  selector:
+    matchLabels:
+      name: {{ .Release.Name }}-scheduler
+  template:
+    metadata:
+      labels:
+        name: {{ .Release.Name }}-scheduler
+{{ include "openwhisk.label_boilerplate" . | indent 8 }}
+
+      {{- if .Values.metrics.prometheusEnabled }}
+      annotations:
+        prometheus.io/scrape: 'true'
+        prometheus.io/port:   '{{ .Values.scheduler.port }}'
+      {{- end }}
+
+    spec:
+      serviceAccountName: {{ .Release.Name }}-core
+      restartPolicy: {{ .Values.scheduler.restartPolicy }}
+
+      {{- if .Values.affinity.enabled }}
+      affinity:
+{{ include "openwhisk.affinity.core" . | indent 8 }}
+{{ include "openwhisk.affinity.selfAntiAffinity" ( printf "%s-scheduler" .Release.Name ) | indent 8 }}
+      {{- end }}
+
+      {{- if .Values.toleration.enabled }}
+      tolerations:
+{{ include "openwhisk.toleration.core" . | indent 8 }}
+      {{- end }}
+
+      initContainers:
+      # The scheduler must wait for kafka and/or couchdb to be ready before it starts
+{{ include "openwhisk.readiness.waitForController" . | indent 6 }}
+{{ include "openwhisk.docker.imagePullSecrets" . | indent 6 }}
+
+      containers:
+      - name: scheduler
+        imagePullPolicy: {{ .Values.scheduler.imagePullPolicy | quote }}
+        image: "{{- .Values.docker.registry.name -}}{{- .Values.scheduler.imageName -}}:{{- .Values.scheduler.imageTag -}}"
+        command: ["/bin/bash", "-c", "/init.sh `hostname | awk -F '-' '{print $NF}'`"]
+        ports:
+        - name: scheduler
+          containerPort: {{ .Values.scheduler.port }}
+        - name: rpc
+          containerPort: {{ .Values.scheduler.rpcPort }}
+        - name: akka-remoting
+          containerPort: 25520
+        - name: akka-mgmt-http
+          containerPort: 19999
+        livenessProbe:
+          httpGet:
+            path: "/ping"
+            port: {{ .Values.scheduler.port }}
+            scheme: "HTTP"
+          initialDelaySeconds: {{ .Values.probes.scheduler.livenessProbe.initialDelaySeconds }}
+          periodSeconds: {{ .Values.probes.scheduler.livenessProbe.periodSeconds }}
+          timeoutSeconds: {{ .Values.probes.scheduler.livenessProbe.timeoutSeconds }}
+        readinessProbe:
+          httpGet:
+            path: "/ping"
+            port: {{ .Values.scheduler.port }}
+            scheme: "HTTP"
+          initialDelaySeconds: {{ .Values.probes.scheduler.readinessProbe.initialDelaySeconds }}
+          periodSeconds: {{ .Values.probes.scheduler.readinessProbe.periodSeconds }}
+          timeoutSeconds: {{ .Values.probes.scheduler.readinessProbe.timeoutSeconds }}
+        env:

Review Comment:
   `CONFIG_whisk_scheduler_queue_maxBlackboxRetentionMs` is required.
   https://github.com/apache/openwhisk/blob/master/ansible/roles/schedulers/tasks/deploy.yml#L128



##########
helm/openwhisk/templates/_helpers.tpl:
##########
@@ -224,12 +238,20 @@ app: {{ template "openwhisk.fullname" . }}
   value: {{ .Values.whisk.kafka.topics.health.retentionMs | quote }}
 - name: "CONFIG_whisk_kafka_topics_health_segmentBytes"
   value: {{ .Values.whisk.kafka.topics.health.segmentBytes | quote }}
+
 - name: "CONFIG_whisk_kafka_topics_invoker_retentionBytes"
   value: {{ .Values.whisk.kafka.topics.invoker.retentionBytes | quote }}
 - name: "CONFIG_whisk_kafka_topics_invoker_retentionMs"
   value: {{ .Values.whisk.kafka.topics.invoker.retentionMs | quote }}
 - name: "CONFIG_whisk_kafka_topics_invoker_segmentBytes"
   value: {{ .Values.whisk.kafka.topics.invoker.segmentBytes | quote }}
+
+- name: "CONFIG_whisk_kafka_topics_scheduler_retentionBytes"
+  value: {{ .Values.whisk.kafka.topics.scheduler.retentionBytes | quote }}
+- name: "CONFIG_whisk_kafka_topics_scheduler_retentionMs"
+  value: {{ .Values.whisk.kafka.topics.scheduler.retentionMs | quote }}
+- name: "CONFIG_whisk_kafka_topics_scheduler_segmentBytes"
+  value: {{ .Values.whisk.kafka.topics.scheduler.segmentBytes | quote }}

Review Comment:
   Not only topic configurations for the `scheduler` topic but also for the `creationAck` topic are required.
   https://github.com/apache/openwhisk/blob/master/ansible/roles/schedulers/tasks/deploy.yml#L144



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org