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


##########
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:
   Regarding ```whisk_cluster_name```: I believe you name a deployment when you 
create it with helm (which becomes ```Release.name``` in the helm template 
files), which would allow you to deploy multiple deployments on the same 
kubernetes without conflict (I am speaking hypothetically, as I have not tried 
this myself). If I am understanding correctly, perhaps ```whisk_cluster_name``` 
is not needed here. @dgrove-oss does this seem correct?



-- 
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-unsubscr...@openwhisk.apache.org

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

Reply via email to