fraochan commented on code in PR #16:
URL: https://github.com/apache/ozone-helm-charts/pull/16#discussion_r1893207259


##########
charts/ozone/templates/recon/recon-statefulset.yaml:
##########
@@ -0,0 +1,101 @@
+{{/*
+  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.recon.enabled }}
+{{- $env := concat .Values.env .Values.recon.env }}
+{{- $envFrom := concat .Values.envFrom .Values.recon.envFrom }}
+{{- $nodeSelector := or .Values.recon.nodeSelector .Values.nodeSelector }}
+{{- $affinity := or .Values.recon.affinity .Values.affinity }}
+{{- $tolerations := or .Values.recon.tolerations .Values.tolerations }}
+{{- $securityContext := or .Values.recon.securityContext 
.Values.securityContext }}
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+  name: {{ .Release.Name }}-recon
+  labels:
+    {{- include "ozone.labels" . | nindent 4 }}
+    app.kubernetes.io/component: recon
+spec:
+  replicas: 1
+  serviceName: {{ .Release.Name }}-recon
+  selector:
+    matchLabels:
+      {{- include "ozone.selectorLabels" . | nindent 6 }}
+      app.kubernetes.io/component: recon
+  template:
+    metadata:
+      annotations:
+        checksum/config: {{ include (print $.Template.BasePath 
"/ozone-configmap.yaml") . | sha256sum }}
+      labels:
+        {{- include "ozone.selectorLabels" . | nindent 8 }}
+        app.kubernetes.io/component: recon
+    spec:
+      containers:
+        - name: recon
+          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | 
default .Chart.AppVersion }}"
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          {{- with .Values.recon.command }}
+          command: {{- tpl (toYaml .) $ | nindent 12 }}
+          {{- end }}
+          {{- with .Values.recon.args }}
+          args: {{- tpl (toYaml .) $ | nindent 12 }}
+          {{- end }}
+          env:
+            {{- include "ozone.configuration.env" . | nindent 12 }}
+            - name: WAITFOR
+              value: {{ $.Release.Name }}-scm-0.{{ $.Release.Name 
}}-scm-headless:{{ .Values.scm.service.port }}

Review Comment:
   I was inspired by the Apache Ozone Kubernetes examples of the source 
repository. But indeed, I agree with you.
   
   Recon runs in a loop until it can communicate with the SCM headless service. 
In my opinion, deleting this part is enough.
   
   Otherwise, I'll do an `initContainer` (although I'm not sure yet what I'll 
do as a check to make Recon wait, probably not too hard but I haven't thought 
about it yet).



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to