Skip to content

Commit

Permalink
Conditional deploymnt of minio operator console programmatically
Browse files Browse the repository at this point in the history
Signed-off-by: Shubhendu Ram Tripathi <[email protected]>
  • Loading branch information
shtripat committed Oct 10, 2023
1 parent b345b04 commit ec1426c
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions helm/operator/templates/console-clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.console.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down Expand Up @@ -235,3 +236,4 @@ rules:
- get
- list
- watch
{{- end }}
2 changes: 2 additions & 0 deletions helm/operator/templates/console-clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.console.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand All @@ -10,3 +11,4 @@ subjects:
- kind: ServiceAccount
name: console-sa
namespace: {{ .Release.Namespace }}
{{- end }}
2 changes: 2 additions & 0 deletions helm/operator/templates/console-configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{- if .Values.console.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: console-env
data:
CONSOLE_PORT: "9090"
CONSOLE_TLS_PORT: "9443"
{{- end }}
2 changes: 2 additions & 0 deletions helm/operator/templates/console-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.console.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -61,3 +62,4 @@ spec:
{{- with .Values.console.volumes }}
volumes: {{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions helm/operator/templates/console-ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.console.enabled }}
{{- if .Values.console.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
Expand Down Expand Up @@ -35,3 +36,4 @@ spec:
port:
name: http
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions helm/operator/templates/console-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{- if .Values.console.enabled }}
apiVersion: v1
kind: Secret
metadata:
name: console-sa-secret
annotations:
kubernetes.io/service-account.name: console-sa
type: kubernetes.io/service-account-token
{{- end }}
2 changes: 2 additions & 0 deletions helm/operator/templates/console-service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.console.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -10,3 +11,4 @@ spec:
- name: https
port: 9443
selector: {{- include "minio-operator.console-selectorLabels" . | nindent 4 }}
{{- end }}
2 changes: 2 additions & 0 deletions helm/operator/templates/console-serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{{- if .Values.console.enabled }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: console-sa
{{- end }}
1 change: 1 addition & 0 deletions helm/operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ operator:
ephemeral-storage: 500Mi

console:
enabled: true
image:
repository: quay.io/minio/operator
tag: v5.0.9
Expand Down

0 comments on commit ec1426c

Please sign in to comment.