diff --git a/helm/operator/templates/console-clusterrole.yaml b/helm/operator/templates/console-clusterrole.yaml index d6c4db7a7af..e6d1c467e99 100644 --- a/helm/operator/templates/console-clusterrole.yaml +++ b/helm/operator/templates/console-clusterrole.yaml @@ -1,3 +1,4 @@ +{{- if .Values.console.enabled }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -235,3 +236,4 @@ rules: - get - list - watch +{{- end }} diff --git a/helm/operator/templates/console-clusterrolebinding.yaml b/helm/operator/templates/console-clusterrolebinding.yaml index ae8b447b162..05f06d52bf5 100644 --- a/helm/operator/templates/console-clusterrolebinding.yaml +++ b/helm/operator/templates/console-clusterrolebinding.yaml @@ -1,3 +1,4 @@ +{{- if .Values.console.enabled }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: @@ -10,3 +11,4 @@ subjects: - kind: ServiceAccount name: console-sa namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/helm/operator/templates/console-configmap.yaml b/helm/operator/templates/console-configmap.yaml index 0a38bcf1e5b..ef4e2ad336c 100644 --- a/helm/operator/templates/console-configmap.yaml +++ b/helm/operator/templates/console-configmap.yaml @@ -1,3 +1,4 @@ +{{- if .Values.console.enabled }} apiVersion: v1 kind: ConfigMap metadata: @@ -5,3 +6,4 @@ metadata: data: CONSOLE_PORT: "9090" CONSOLE_TLS_PORT: "9443" +{{- end }} diff --git a/helm/operator/templates/console-deployment.yaml b/helm/operator/templates/console-deployment.yaml index e224eceb02c..f57ebb02d8e 100644 --- a/helm/operator/templates/console-deployment.yaml +++ b/helm/operator/templates/console-deployment.yaml @@ -1,3 +1,4 @@ +{{- if .Values.console.enabled }} apiVersion: apps/v1 kind: Deployment metadata: @@ -61,3 +62,4 @@ spec: {{- with .Values.console.volumes }} volumes: {{- toYaml . | nindent 8 }} {{- end }} +{{- end }} diff --git a/helm/operator/templates/console-ingress.yaml b/helm/operator/templates/console-ingress.yaml index 3a8fd62a0ba..14b9a7c0b5b 100644 --- a/helm/operator/templates/console-ingress.yaml +++ b/helm/operator/templates/console-ingress.yaml @@ -1,3 +1,4 @@ +{{- if .Values.console.enabled }} {{- if .Values.console.ingress.enabled }} apiVersion: networking.k8s.io/v1 kind: Ingress @@ -35,3 +36,4 @@ spec: port: name: http {{- end }} +{{- end }} diff --git a/helm/operator/templates/console-secret.yaml b/helm/operator/templates/console-secret.yaml index ce5b5fe65f0..42a9c85363c 100644 --- a/helm/operator/templates/console-secret.yaml +++ b/helm/operator/templates/console-secret.yaml @@ -1,3 +1,4 @@ +{{- if .Values.console.enabled }} apiVersion: v1 kind: Secret metadata: @@ -5,3 +6,4 @@ metadata: annotations: kubernetes.io/service-account.name: console-sa type: kubernetes.io/service-account-token +{{- end }} diff --git a/helm/operator/templates/console-service.yaml b/helm/operator/templates/console-service.yaml index 429e1612c68..392578a7e79 100644 --- a/helm/operator/templates/console-service.yaml +++ b/helm/operator/templates/console-service.yaml @@ -1,3 +1,4 @@ +{{- if .Values.console.enabled }} apiVersion: v1 kind: Service metadata: @@ -10,3 +11,4 @@ spec: - name: https port: 9443 selector: {{- include "minio-operator.console-selectorLabels" . | nindent 4 }} +{{- end }} diff --git a/helm/operator/templates/console-serviceaccount.yaml b/helm/operator/templates/console-serviceaccount.yaml index a19e58a06e0..a5972e359db 100644 --- a/helm/operator/templates/console-serviceaccount.yaml +++ b/helm/operator/templates/console-serviceaccount.yaml @@ -1,4 +1,6 @@ +{{- if .Values.console.enabled }} apiVersion: v1 kind: ServiceAccount metadata: name: console-sa +{{- end }} diff --git a/helm/operator/values.yaml b/helm/operator/values.yaml index 632e0282130..33658e57d62 100644 --- a/helm/operator/values.yaml +++ b/helm/operator/values.yaml @@ -68,6 +68,7 @@ operator: ephemeral-storage: 500Mi console: + enabled: true image: repository: quay.io/minio/operator tag: v5.0.9