Repository navigation
fix(configmap): expose gitops.applicationHealthCheckEnabled and other operator keys #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,8 +21,22 @@ data: | |
| gitops.customArgoYaml: | | ||
| {{ .Values.main.gitops.customArgoYaml | indent 4 }} | ||
| {{- end }} | ||
| {{- if .Values.main.gitops.applicationHealthCheckEnabled }} | ||
| gitops.applicationHealthCheckEnabled: {{ .Values.main.gitops.applicationHealthCheckEnabled | quote }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P2] Truthy-looking values silently disable the check. The operator uses [P3] Missing key: the operator also reads |
||
| {{- end }} | ||
| {{- if .Values.main.gitops.customHealthChecks }} | ||
| gitops.customHealthChecks: | | ||
| {{ .Values.main.gitops.customHealthChecks | indent 4 }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P1 – must fix] Native YAML list breaks rendering. Suggested fix: {{- $v := .Values.main.gitops.customHealthChecks }}
{{ if kindIs "string" $v }}{{ $v | indent 4 }}{{ else }}{{ toYaml $v | indent 4 }}{{ end }}[P2] No validation; the operator silently drops invalid checks. If the string isn't valid YAML for |
||
| {{- end }} | ||
| {{- if .Values.main.gitops.sourceNamespace }} | ||
| gitops.sourceNamespace: {{ .Values.main.gitops.sourceNamespace }} | ||
| {{- end }} | ||
| {{- if .Values.main.gitops.installApprovalPlan }} | ||
| gitops.installApprovalPlan: {{ .Values.main.gitops.installApprovalPlan }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P2] Case-sensitive value is silently ignored. The operator compares |
||
| {{- end }} | ||
| {{- if .Values.main.gitops.csv }} | ||
| gitops.csv: {{ .Values.main.gitops.csv }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P1 – must fix] Unquoted values. |
||
| {{- end }} | ||
|
|
||
| # gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace | ||
| # gitops.installApprovalPlan: GitOpsDefaultApprovalPlan | ||
| # gitops.ManualSync: GitOpsDefaultManualSync | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P3] Stale placeholder comments. |
||
| # gitops.name: GitOpsDefaultPackageName | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -102,6 +102,86 @@ tests: | |
| - exists: | ||
| path: data["gitops.customArgoYaml"] | ||
|
|
||
| - it: Should not include gitops.applicationHealthCheckEnabled by default | ||
| asserts: | ||
| - notExists: | ||
| path: data["gitops.applicationHealthCheckEnabled"] | ||
|
|
||
| - it: Should set gitops.applicationHealthCheckEnabled as a string | ||
| set: | ||
| main: | ||
| gitops: | ||
| applicationHealthCheckEnabled: "true" | ||
| asserts: | ||
| - equal: | ||
| path: data["gitops.applicationHealthCheckEnabled"] | ||
| value: "true" | ||
|
|
||
| - it: Should not include gitops.customHealthChecks by default | ||
| asserts: | ||
| - notExists: | ||
| path: data["gitops.customHealthChecks"] | ||
|
|
||
| - it: Should set gitops.customHealthChecks | ||
| set: | ||
| main: | ||
| gitops: | ||
| customHealthChecks: | | ||
| - group: example.com | ||
| kind: MyKind | ||
| check: | | ||
| hs = {} | ||
| hs.status = "Healthy" | ||
| return hs | ||
| asserts: | ||
| - exists: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P3] Weak assertion. |
||
| path: data["gitops.customHealthChecks"] | ||
|
|
||
| - it: Should not include gitops.sourceNamespace by default | ||
| asserts: | ||
| - notExists: | ||
| path: data["gitops.sourceNamespace"] | ||
|
|
||
| - it: Should set gitops.sourceNamespace | ||
| set: | ||
| main: | ||
| gitops: | ||
| sourceNamespace: openshift-marketplace | ||
| asserts: | ||
| - equal: | ||
| path: data["gitops.sourceNamespace"] | ||
| value: openshift-marketplace | ||
|
|
||
| - it: Should not include gitops.installApprovalPlan by default | ||
| asserts: | ||
| - notExists: | ||
| path: data["gitops.installApprovalPlan"] | ||
|
|
||
| - it: Should set gitops.installApprovalPlan | ||
| set: | ||
| main: | ||
| gitops: | ||
| installApprovalPlan: Manual | ||
| asserts: | ||
| - equal: | ||
| path: data["gitops.installApprovalPlan"] | ||
| value: Manual | ||
|
|
||
| - it: Should not include gitops.csv by default | ||
| asserts: | ||
| - notExists: | ||
| path: data["gitops.csv"] | ||
|
|
||
| - it: Should set gitops.csv | ||
| set: | ||
| main: | ||
| gitops: | ||
| csv: openshift-gitops-operator.v1.22.0 | ||
| asserts: | ||
| - equal: | ||
| path: data["gitops.csv"] | ||
| value: openshift-gitops-operator.v1.22.0 | ||
|
|
||
| - it: Should set gitea parameters | ||
| set: | ||
| main: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P3] README edited by hand. These rows look hand-added rather than generated with
make helm-docs, and the version badge (line 3) still says0.0.18while Chart.yaml is0.0.19. Please runmake helm-docsand commit the result so the next regeneration doesn't overwrite these edits.