diff --git a/chart/templates/minio/minio-operator/gitrepository.yaml b/chart/templates/minio/minio-operator/gitrepository.yaml index 434a43c8b98f6268a3635b0880de90a416d20845..6d80c63d41198b3c10b4662897ccfa450af99f71 100644 --- a/chart/templates/minio/minio-operator/gitrepository.yaml +++ b/chart/templates/minio/minio-operator/gitrepository.yaml @@ -1,4 +1,4 @@ -{{- if and (not .Values.offline) .Values.minio.enabled }} +{{- if and (not .Values.offline) .Values.addons.minioOperator.enabled }} apiVersion: source.toolkit.fluxcd.io/v1beta1 kind: GitRepository metadata: @@ -6,9 +6,9 @@ metadata: namespace: {{ .Release.Namespace }} spec: interval: {{ .Values.flux.interval }} - url: {{ .Values.minio.miniooperator.git.repo }} + url: {{ .Values.addons.minioOperator.git.repo }} ref: - {{- include "validRef" .Values.minio.miniooperator.git | nindent 4 }} + {{- include "validRef" .Values.addons.minioOperator.git | nindent 4 }} {{ include "gitIgnore" . }} {{- include "gitCreds" . | nindent 2 }} {{- end }} diff --git a/chart/templates/minio/minio-operator/minio-operator-helmrelease.yaml b/chart/templates/minio/minio-operator/minio-operator-helmrelease.yaml index e465cc3a1540f4cdf9b7931a91824c4b446ce8fa..31a6d81947838eaec1df904da0807f296b897bf6 100644 --- a/chart/templates/minio/minio-operator/minio-operator-helmrelease.yaml +++ b/chart/templates/minio/minio-operator/minio-operator-helmrelease.yaml @@ -1,4 +1,4 @@ -{{- if .Values.minio.enabled }} +{{- if .Values.addons.minioOperator.enabled }} apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: @@ -8,7 +8,7 @@ spec: targetNamespace: minio-operator chart: spec: - chart: {{ .Values.minio.miniooperator.git.path }} + chart: {{ .Values.addons.minioOperator.git.path }} interval: 5m sourceRef: kind: GitRepository diff --git a/chart/templates/minio/minio-operator/namespace.yaml b/chart/templates/minio/minio-operator/namespace.yaml index 6dfcf44dc707b23d7fa45eac0680b490331d3c8e..88a1e7cdfee5168317935ba8f5a11e1b83531e1c 100644 --- a/chart/templates/minio/minio-operator/namespace.yaml +++ b/chart/templates/minio/minio-operator/namespace.yaml @@ -1,10 +1,14 @@ -{{- if .Values.minio.enabled }} +{{- if .Values.addons.minioOperator.enabled }} apiVersion: v1 kind: Namespace metadata: name: minio-operator labels: istio-injection: enabled + app.kubernetes.io/name: minioOperator + app.kubernetes.io/component: "application-utilities" + {{- include "commonLabels" . | nindent 4}} + --- {{- if ( include "imagePullSecret" . ) }} apiVersion: v1 diff --git a/chart/templates/minio/minio-instance/gitrepository.yaml b/chart/templates/minio/minio/gitrepository.yaml similarity index 59% rename from chart/templates/minio/minio-instance/gitrepository.yaml rename to chart/templates/minio/minio/gitrepository.yaml index cd9a1380f00943fd56740e68d9c987577cf88dbc..8f60b193309b7351c241854b7d01936ec66e1e69 100644 --- a/chart/templates/minio/minio-instance/gitrepository.yaml +++ b/chart/templates/minio/minio/gitrepository.yaml @@ -1,4 +1,4 @@ -{{- if and (not .Values.offline) .Values.minio.enabled }} +{{- if and (not .Values.offline) .Values.addons.minio.enabled }} apiVersion: source.toolkit.fluxcd.io/v1beta1 kind: GitRepository metadata: @@ -6,9 +6,9 @@ metadata: namespace: {{ .Release.Namespace }} spec: interval: {{ .Values.flux.interval }} - url: {{ .Values.minio.minioinstance.git.repo }} + url: {{ .Values.addons.minio.git.repo }} ref: - {{- include "validRef" .Values.minio.minioinstance.git | nindent 4 }} + {{- include "validRef" .Values.addons.minio.git | nindent 4 }} {{ include "gitIgnore" . }} {{- include "gitCreds" . | nindent 2 }} {{- end }} diff --git a/chart/templates/minio/minio-instance/minio-instance-helmrelease.yaml b/chart/templates/minio/minio/minio-helmrelease.yaml similarity index 74% rename from chart/templates/minio/minio-instance/minio-instance-helmrelease.yaml rename to chart/templates/minio/minio/minio-helmrelease.yaml index d4bdeb2eb2af7cbfec757506d9c8d731319c1f12..588437c54b8f346d078233172348099a1975f33a 100644 --- a/chart/templates/minio/minio-instance/minio-instance-helmrelease.yaml +++ b/chart/templates/minio/minio/minio-helmrelease.yaml @@ -1,4 +1,4 @@ -{{- if .Values.minio.enabled }} +{{- if .Values.addons.minio.enabled }} apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: @@ -8,7 +8,7 @@ spec: targetNamespace: minio chart: spec: - chart: {{ .Values.minio.minioinstance.git.path }} + chart: {{ .Values.addons.minio.git.path }} interval: 5m sourceRef: kind: GitRepository @@ -44,6 +44,13 @@ spec: traffic.sidecar.istio.io/excludeInboundPorts: "9443" imagePullSecrets: - name: private-registry + hostname: {{ .Values.hostname }} + istio: + enabled: {{ .Values.istio.enabled }} + virtualService: + enabled: {{ .Values.addons.minio.virtualService.enabled }} + name: {{ .Values.addons.minio.virtualService.name }} + nameOverride: {{ .Values.addons.minio.name }} dependsOn: - name: minio-operator diff --git a/chart/templates/minio/minio-instance/namespace.yaml b/chart/templates/minio/minio/namespace.yaml similarity index 78% rename from chart/templates/minio/minio-instance/namespace.yaml rename to chart/templates/minio/minio/namespace.yaml index aeb4bb77bb4796a6b1ef9a3e0eb51e8aafbc203f..22a8cb953f4aa054c63bb2eccdea866ebf481533 100644 --- a/chart/templates/minio/minio-instance/namespace.yaml +++ b/chart/templates/minio/minio/namespace.yaml @@ -1,10 +1,13 @@ -{{- if .Values.minio.enabled }} +{{- if .Values.addons.minio.enabled }} apiVersion: v1 kind: Namespace metadata: name: minio labels: istio-injection: enabled + app.kubernetes.io/name: minio + app.kubernetes.io/component: "application-utilities" + {{- include "commonLabels" . | nindent 4}} --- {{- if ( include "imagePullSecret" . ) }} apiVersion: v1 diff --git a/chart/templates/values.yaml b/chart/templates/values.yaml index 9a897291f19082d686678e71e87b927f61b480cd..f8eb0a6641e400d2858c466d9648d6b852cefd36 100644 --- a/chart/templates/values.yaml +++ b/chart/templates/values.yaml @@ -50,9 +50,9 @@ stringData: clusterauditor.yaml: | {{ toYaml .Values.twistlock.values | indent 4 }} miniooperator.yaml: | -{{ toYaml .Values.minio.miniooperator.values | indent 4 }} +{{ toYaml .Values.addons.minioOperator.values | indent 4 }} minio.yaml: | -{{ toYaml .Values.minio.minioinstance.values | indent 4 }} +{{ toYaml .Values.addons.minio.values | indent 4 }} gitlab.yaml: | {{ toYaml .Values.addons.gitlab.values | indent 4 }} anchore.yaml: | diff --git a/chart/values.yaml b/chart/values.yaml index 4ef9a91f7fe55e34fc088f5a397d126761b44e78..1df80b9840009ed406d1200ea51b059469630a39 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -266,30 +266,6 @@ twistlock: # -- Values to passthrough to the twistlock chart: https://repo1.dso.mil/platform-one/big-bang/apps/security-tools/twistlock.git values: {} -# ---------------------------------------------------------------------------------------------------------------------- -# Minio Operator and Instance -# -minio: - # -- Toggle deployment of minio operator and instance. - enabled: true - miniooperator: - git: - repo: https://repo1.dso.mil/platform-one/big-bang/apps/application-utilities/minio-operator.git - path: "./chart" - tag: "2.0.9-bb.1" - - # -- Values to passthrough to the minio operator chart: https://repo1.dso.mil/platform-one/big-bang/apps/application-utilities/minio-operator.git - values: {} - - minioinstance: - git: - repo: https://repo1.dso.mil/platform-one/big-bang/apps/application-utilities/minio.git - path: "./chart" - tag: "2.0.9-bb.1" - - # -- Values to passthrough to the minio instance chart: https://repo1.dso.mil/platform-one/big-bang/apps/application-utilities/minio.git - values: {} - # # ---------------------------------------------------------------------------------------------------------------------- # @@ -341,6 +317,37 @@ addons: # -- Additional authservice chain configurations. chains: {} + # ---------------------------------------------------------------------------------------------------------------------- + # Minio Operator and Instance + # + minioOperator: + # -- Toggle deployment of minio operator and instance. + enabled: false + git: + repo: https://repo1.dso.mil/platform-one/big-bang/apps/application-utilities/minio-operator.git + path: "./chart" + tag: "2.0.9-bb.2" + # -- Values to passthrough to the minio operator chart: https://repo1.dso.mil/platform-one/big-bang/apps/application-utilities/minio-operator.git + values: {} + + minio: + enabled: false + git: + repo: https://repo1.dso.mil/platform-one/big-bang/apps/application-utilities/minio.git + path: "./chart" + tag: "2.0.9-bb.2" + + # Provide a specific name for the minio instance. + name: minio + + # Settings to enable/disable and name the minio virtual service for external access to the minio UI. + virtualService: + enabled: true + name: minio + + # -- Values to passthrough to the minio instance chart: https://repo1.dso.mil/platform-one/big-bang/apps/application-utilities/minio.git + values: {} + gitlab: # -- Toggle deployment of Gitlab. enabled: false