diff --git a/chart/templates/NOTES.txt b/chart/templates/NOTES.txt index 56a0e4d479d0f1a2f758c0fc17cc2d21f7e5bd0d..aada4b045d5ab79255e51a447a6c1d54b95b41a2 100644 --- a/chart/templates/NOTES.txt +++ b/chart/templates/NOTES.txt @@ -185,4 +185,8 @@ DEPRECATION NOTICE: Please reconfigure your values overrides to use .Values.addons.nexusRepositoryManager {{- end }} - +{{- if .Values.addons.mattermostoperator }} +DEPRECATION NOTICE: + .Values.addons.mattermostoperator has been deprecated and will be removed in a future Big Bang release. + Please reconfigure your values overrides to use .Values.addons.mattermostOperator +{{- end }} diff --git a/chart/templates/mattermost/operator/gitrepository.yaml b/chart/templates/mattermost-operator/gitrepository.yaml similarity index 53% rename from chart/templates/mattermost/operator/gitrepository.yaml rename to chart/templates/mattermost-operator/gitrepository.yaml index 33e9e9d5c00913c04553f83ce808e435c70a8c66..f738b15b4f199c8dc1a1240032806597a4fe51e4 100644 --- a/chart/templates/mattermost/operator/gitrepository.yaml +++ b/chart/templates/mattermost-operator/gitrepository.yaml @@ -1,4 +1,6 @@ -{{- if and (eq (include "checkGitRef" .Values.addons.mattermostoperator) "true") (not .Values.offline) (or .Values.addons.mattermostoperator.enabled .Values.addons.mattermost.enabled) }} +{{- $mmOpOldValues := default dict .Values.addons.mattermostoperator -}} +{{- $mmOpValues := merge $mmOpOldValues .Values.addons.mattermostOperator -}} +{{- if and (eq (include "checkGitRef" $mmOpValues) "true") (not .Values.offline) (or $mmOpValues.enabled .Values.addons.mattermost.enabled) }} apiVersion: source.toolkit.fluxcd.io/v1beta2 kind: GitRepository metadata: @@ -10,9 +12,9 @@ metadata: {{- include "commonLabels" . | nindent 4}} spec: interval: {{ .Values.flux.interval }} - url: {{ .Values.addons.mattermostoperator.git.repo }} + url: {{ $mmOpValues.git.repo }} ref: - {{- include "validRef" .Values.addons.mattermostoperator.git | nindent 4 }} + {{- include "validRef" $mmOpValues.git | nindent 4 }} {{ include "gitIgnore" . }} {{- include "gitCreds" . | nindent 2 }} {{- end }} diff --git a/chart/templates/mattermost/operator/helmrelease.yaml b/chart/templates/mattermost-operator/helmrelease.yaml similarity index 71% rename from chart/templates/mattermost/operator/helmrelease.yaml rename to chart/templates/mattermost-operator/helmrelease.yaml index 8ff13def2ed1d107482a69678d9f1c96037a7ffa..0ca4d0a41febac781f099412ef20cb7e2a678cc6 100644 --- a/chart/templates/mattermost/operator/helmrelease.yaml +++ b/chart/templates/mattermost-operator/helmrelease.yaml @@ -1,5 +1,7 @@ -{{- $fluxSettingsMattermostOperator := merge .Values.addons.mattermostoperator.flux .Values.flux -}} -{{- if or .Values.addons.mattermostoperator.enabled .Values.addons.mattermost.enabled }} +{{- $mmOpOldValues := default dict .Values.addons.mattermostoperator -}} +{{- $mmOpValues := merge $mmOpOldValues .Values.addons.mattermostOperator -}} +{{- $fluxSettingsMattermostOperator := merge $mmOpValues.flux .Values.flux -}} +{{- if or $mmOpValues.enabled .Values.addons.mattermost.enabled }} apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: @@ -13,27 +15,27 @@ spec: targetNamespace: mattermost-operator chart: spec: - {{- if eq (include "checkGitRef" .Values.addons.mattermostoperator) "true" }} - chart: {{ .Values.addons.mattermostoperator.git.path }} + {{- if eq (include "checkGitRef" $mmOpValues) "true" }} + chart: {{ $mmOpValues.git.path }} sourceRef: kind: GitRepository name: mattermost-operator namespace: {{ .Release.Namespace }} {{- else }} - chart: {{ .Values.addons.mattermostoperator.oci.name }} - version: {{ .Values.addons.mattermostoperator.oci.tag }} + chart: {{ $mmOpValues.oci.name }} + version: {{ $mmOpValues.oci.tag }} sourceRef: kind: HelmRepository - name: {{ .Values.addons.mattermostoperator.oci.repo }} + name: {{ $mmOpValues.oci.repo }} namespace: {{ .Release.Namespace }} {{- end }} interval: 5m {{- toYaml $fluxSettingsMattermostOperator | nindent 2 }} - {{- if .Values.addons.mattermostoperator.postRenderers }} + {{- if $mmOpValues.postRenderers }} postRenderers: - {{- toYaml .Values.addons.mattermostoperator.postRenderers | nindent 4 }} + {{- toYaml $mmOpValues.postRenderers | nindent 4 }} {{- end }} valuesFrom: - name: {{ .Release.Name }}-mattermost-operator-values diff --git a/chart/templates/mattermost/operator/imagepullsecret.yaml b/chart/templates/mattermost-operator/imagepullsecret.yaml similarity index 65% rename from chart/templates/mattermost/operator/imagepullsecret.yaml rename to chart/templates/mattermost-operator/imagepullsecret.yaml index 3e94f0272ef2b9ca0fe0a4d0569e9fa585a9f601..f0727daa48d0061e58ebd775b677c3a0827ff57f 100644 --- a/chart/templates/mattermost/operator/imagepullsecret.yaml +++ b/chart/templates/mattermost-operator/imagepullsecret.yaml @@ -1,4 +1,6 @@ -{{- if or .Values.addons.mattermostoperator.enabled .Values.addons.mattermost.enabled }} +{{- $mmOpOldValues := default dict .Values.addons.mattermostoperator -}} +{{- $mmOpValues := merge $mmOpOldValues .Values.addons.mattermostOperator -}} +{{- if or $mmOpValues.enabled .Values.addons.mattermost.enabled }} {{- if ( include "imagePullSecret" . ) }} apiVersion: v1 kind: Secret diff --git a/chart/templates/mattermost/operator/namespace.yaml b/chart/templates/mattermost-operator/namespace.yaml similarity index 55% rename from chart/templates/mattermost/operator/namespace.yaml rename to chart/templates/mattermost-operator/namespace.yaml index 4707ae7bf31d83e75955d05c22ff7a93dd29af40..5e7b000cd8dba06971bd0e03a68e1395746cf653 100644 --- a/chart/templates/mattermost/operator/namespace.yaml +++ b/chart/templates/mattermost-operator/namespace.yaml @@ -1,4 +1,6 @@ -{{- if or .Values.addons.mattermostoperator.enabled .Values.addons.mattermost.enabled }} +{{- $mmOpOldValues := default dict .Values.addons.mattermostoperator -}} +{{- $mmOpValues := merge $mmOpOldValues .Values.addons.mattermostOperator -}} +{{- if or $mmOpValues.enabled .Values.addons.mattermost.enabled }} apiVersion: v1 kind: Namespace metadata: diff --git a/chart/templates/mattermost/operator/values.yaml b/chart/templates/mattermost-operator/values.yaml similarity index 53% rename from chart/templates/mattermost/operator/values.yaml rename to chart/templates/mattermost-operator/values.yaml index abc7f1848d52c5bf6e2dbaab9977833ee29f5548..0bdb31b9f6331f1a149b510401ad0b13aab068ae 100644 --- a/chart/templates/mattermost/operator/values.yaml +++ b/chart/templates/mattermost-operator/values.yaml @@ -1,8 +1,10 @@ -{{- if or .Values.addons.mattermostoperator.enabled .Values.addons.mattermost.enabled }} -{{- include "values-secret" (dict "root" $ "package" .Values.addons.mattermostoperator "name" "mattermost-operator" "defaults" (include "bigbang.defaults.mattermostoperator" .)) }} +{{- $mmOpOldValues := default dict .Values.addons.mattermostoperator -}} +{{- $mmOpValues := merge $mmOpOldValues .Values.addons.mattermostOperator -}} +{{- if or $mmOpValues.enabled .Values.addons.mattermost.enabled }} +{{- include "values-secret" (dict "root" $ "package" $mmOpValues "name" "mattermost-operator" "defaults" (include "bigbang.defaults.mattermostOperator" .)) }} {{- end }} -{{- define "bigbang.defaults.mattermostoperator" -}} +{{- define "bigbang.defaults.mattermostOperator" -}} imagePullSecrets: - name: private-registry diff --git a/chart/templates/mattermost/mattermost/gitrepository.yaml b/chart/templates/mattermost/gitrepository.yaml similarity index 100% rename from chart/templates/mattermost/mattermost/gitrepository.yaml rename to chart/templates/mattermost/gitrepository.yaml diff --git a/chart/templates/mattermost/mattermost/helmrelease.yaml b/chart/templates/mattermost/helmrelease.yaml similarity index 100% rename from chart/templates/mattermost/mattermost/helmrelease.yaml rename to chart/templates/mattermost/helmrelease.yaml diff --git a/chart/templates/mattermost/mattermost/imagepullsecret.yaml b/chart/templates/mattermost/imagepullsecret.yaml similarity index 100% rename from chart/templates/mattermost/mattermost/imagepullsecret.yaml rename to chart/templates/mattermost/imagepullsecret.yaml diff --git a/chart/templates/mattermost/mattermost/namespace.yaml b/chart/templates/mattermost/namespace.yaml similarity index 100% rename from chart/templates/mattermost/mattermost/namespace.yaml rename to chart/templates/mattermost/namespace.yaml diff --git a/chart/templates/mattermost/mattermost/secret-ca.yaml b/chart/templates/mattermost/secret-ca.yaml similarity index 100% rename from chart/templates/mattermost/mattermost/secret-ca.yaml rename to chart/templates/mattermost/secret-ca.yaml diff --git a/chart/templates/mattermost/mattermost/secret-database.yaml b/chart/templates/mattermost/secret-database.yaml similarity index 100% rename from chart/templates/mattermost/mattermost/secret-database.yaml rename to chart/templates/mattermost/secret-database.yaml diff --git a/chart/templates/mattermost/mattermost/secret-objectstore.yaml b/chart/templates/mattermost/secret-objectstore.yaml similarity index 100% rename from chart/templates/mattermost/mattermost/secret-objectstore.yaml rename to chart/templates/mattermost/secret-objectstore.yaml diff --git a/chart/templates/mattermost/mattermost/values.yaml b/chart/templates/mattermost/values.yaml similarity index 100% rename from chart/templates/mattermost/mattermost/values.yaml rename to chart/templates/mattermost/values.yaml diff --git a/chart/values.yaml b/chart/values.yaml index 1b04790744ffbff06b9cd20665734cf3344a43d0..ddf323c5a7a81884cb29c61d7d2ef94cd7d3c65b 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -1254,7 +1254,7 @@ addons: # ---------------------------------------------------------------------------------------------------------------------- # Mattermost Operator and Instance # - mattermostoperator: + mattermostOperator: enabled: false git: repo: https://repo1.dso.mil/platform-one/big-bang/apps/collaboration-tools/mattermost-operator.git diff --git a/chart/values2.0.yaml b/chart/values2.0.yaml index 79e53cf2acfc6348cdf358ff934fee7981d0eb6d..2eecd35bc2f728d33dc78a74ca32a940b0045dfa 100644 --- a/chart/values2.0.yaml +++ b/chart/values2.0.yaml @@ -200,7 +200,7 @@ addons: tag: "1.20.0-bb.1" repo: "registry1" - mattermostoperator: + mattermostOperator: git: null oci: name: "mattermost-operator" diff --git a/docs/assets/configs/example/git-repo-values.yaml b/docs/assets/configs/example/git-repo-values.yaml index 2be0711d5f3e4e2e01bb410b3eb30a44ae2c4f73..a8ab14c5c18a9db008b434d6663b8d16f6a52cbd 100644 --- a/docs/assets/configs/example/git-repo-values.yaml +++ b/docs/assets/configs/example/git-repo-values.yaml @@ -160,7 +160,7 @@ addons: repo: https://repo1.dso.mil/platform-one/big-bang/apps/security-tools/anchore-enterprise.git path: "./chart" branch: "my-dev-branch" - mattermostoperator: + mattermostOperator: git: repo: https://repo1.dso.mil/platform-one/big-bang/apps/collaboration-tools/mattermost-operator.git path: "./chart" diff --git a/docs/assets/scripts/airgap-dev/values.yaml b/docs/assets/scripts/airgap-dev/values.yaml index 7d1d0fb4311bddeb47145c1eefcabad38cdf8adc..d2c6f5d376131a44639e54ad4df63fbbe5404492 100644 --- a/docs/assets/scripts/airgap-dev/values.yaml +++ b/docs/assets/scripts/airgap-dev/values.yaml @@ -107,7 +107,7 @@ addons: enabled: false git: repo: ssh://git@host.k3d.internal/home/git/repos/haproxy - mattermostoperator: + mattermostOperator: enabled: false git: repo: ssh://git@host.k3d.internal/home/git/repos/mattermost-operator diff --git a/docs/guides/using-bigbang/image-pull-policy.md b/docs/guides/using-bigbang/image-pull-policy.md index 4dde9fbdcedcad2cc3ca9056e3703bbc5e56515c..358c8f1d4e5b9ed1f09bbdcdd4f14e22f2cb3335 100644 --- a/docs/guides/using-bigbang/image-pull-policy.md +++ b/docs/guides/using-bigbang/image-pull-policy.md @@ -35,7 +35,7 @@ We have also documented the package overrides required if you want to set a sing | Nexus | `IfNotPresent` | <pre lang="yaml">addons:<br> nexusRepositoryManager:<br> values:<br> image:<br> pullPolicy: IfNotPresent<br> job_image:<br> pullPolicy: IfNotPresent</pre> | | Sonarqube | `IfNotPresent` | <pre lang="yaml">addons:<br> sonarqube:<br> values:<br> image:<br> pullPolicy: IfNotPresent</pre> | | Anchore | `IfNotPresent` | <pre lang="yaml">addons:<br> anchore:<br> values:<br> anchoreGlobal:<br> imagePullPolicy: IfNotPresent<br> anchoreEnterpriseGlobal:<br> imagePullPolicy: IfNotPresent<br> anchoreEnterpriseUi:<br> imagePullPolicy: IfNotPresent</pre> | -| Mattermost Operator | `IfNotPresent` | <pre lang="yaml">addons:<br> mattermostoperator:<br> values:<br> image:<br> imagePullPolicy: IfNotPresent</pre> | +| Mattermost Operator | `IfNotPresent` | <pre lang="yaml">addons:<br> mattermostOperator:<br> values:<br> image:<br> imagePullPolicy: IfNotPresent</pre> | | Mattermost | `IfNotPresent` | <pre lang="yaml">addons:<br> mattermost:<br> values:<br> image:<br> imagePullPolicy: IfNotPresent</pre> | | Velero | `IfNotPresent` | <pre lang="yaml">addons:<br> velero:<br> values:<br> image:<br> pullPolicy: IfNotPresent</pre> | | Keycloak | `IfNotPresent` | <pre lang="yaml">addons:<br> keycloak:<br> values:<br> image:<br> pullPolicy: IfNotPresent<br> pgchecker:<br> image:<br> pullPolicy: IfNotPresent</pre> | diff --git a/tests/test-values.yaml b/tests/test-values.yaml index 68b5b96b4edffb11376106c98e54e558a5201796..0e69056d34e8f4826a82c545b49920e9bd0248c6 100644 --- a/tests/test-values.yaml +++ b/tests/test-values.yaml @@ -1247,7 +1247,7 @@ addons: MINIO_PORT: '' MINIO_HOST: 'https://minio-api.bigbang.dev' - mattermostoperator: + mattermostOperator: enabled: false mattermost: