dnskr commented on code in PR #45:
URL: https://github.com/apache/ozone-helm-charts/pull/45#discussion_r3610348806


##########
charts/ozone/templates/NOTES.txt:
##########
@@ -55,3 +55,20 @@ Recon
  To access Recon from a browser, use the following command and visit 
localhost:{{ .Values.recon.service.port }}
  $ kubectl port-forward svc/{{ .Release.Name }}-recon {{ 
.Values.recon.service.port }}:{{ .Values.recon.service.port }}
 {{- end }}
+
+****************
+*  Replicas    *
+****************
+Ozone Manager (om.replicas): {{ .Values.om.replicas }}
+Storage Container Manager (scm.replicas): {{ .Values.scm.replicas }}
+
+{{- $om := .Values.om.replicas | int }}
+{{- $scm := .Values.scm.replicas | int }}
+{{- if eq (mod $om 2) 0 }}
+WARNING: om.replicas={{ $om }} is even. Odd replica counts (1, 3, 5, ...) are 
recommended for Raft quorum.
+Even counts may be used temporarily during OM migration 
(bootstrap/decommission), but are not recommended as a steady state.
+{{- end }}
+{{- if eq (mod $scm 2) 0 }}
+WARNING: scm.replicas={{ $scm }} is even. Odd replica counts (1, 3, 5, ...) 
are recommended for Raft quorum.
+Even counts may be used temporarily during SCM migration 
(bootstrap/decommission), but are not recommended as a steady state.
+{{- end }}

Review Comment:
   ```suggestion
   {{- if eq (mod .Values.om.replicas 2) 0 }}
   WARNING: om.replicas={{ .Values.om.replicas }} is even. Odd replica counts 
(1, 3, 5, ...) are recommended for Raft quorum.
   Even counts may be used temporarily during OM migration 
(bootstrap/decommission), but are not recommended as a steady state.
   {{- end }}
   {{- if eq (mod .Values.scm.replicas 2) 0 }}
   WARNING: scm.replicas={{ .Values.scm.replicas }} is even. Odd replica counts 
(1, 3, 5, ...) are recommended for Raft quorum.
   Even counts may be used temporarily during SCM migration 
(bootstrap/decommission), but are not recommended as a steady state.
   {{- end }}
   ```
   Looks like this `int` cast is redundant, so we can simplify by using the 
properties directly.



##########
charts/ozone/templates/NOTES.txt:
##########
@@ -55,3 +55,20 @@ Recon
  To access Recon from a browser, use the following command and visit 
localhost:{{ .Values.recon.service.port }}
  $ kubectl port-forward svc/{{ .Release.Name }}-recon {{ 
.Values.recon.service.port }}:{{ .Values.recon.service.port }}
 {{- end }}
+
+****************
+*  Replicas    *
+****************

Review Comment:
   ```suggestion
   ****************
   *   Replicas   *
   ****************
   ```
   Nit: Let's adjust the alignment to have three spaces on both sides.



-- 
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