Skip to content

Commit

Permalink
Split Helm chart templates into separate files (#1677)
Browse files Browse the repository at this point in the history
  • Loading branch information
dnskr committed Jul 25, 2023
1 parent ef09546 commit de854db
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 51 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: console-sa
---
apiVersion: v1
kind: Secret
metadata:
name: console-sa-secret
annotations:
kubernetes.io/service-account.name: console-sa
type: kubernetes.io/service-account-token
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down Expand Up @@ -248,24 +235,3 @@ rules:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: console-sa-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: console-sa-role
subjects:
- kind: ServiceAccount
name: console-sa
namespace: {{ .Release.Namespace }}
---
apiVersion: v1
data:
CONSOLE_PORT: "9090"
CONSOLE_TLS_PORT: "9443"
kind: ConfigMap
metadata:
name: console-env
12 changes: 12 additions & 0 deletions helm/operator/templates/console-clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: console-sa-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: console-sa-role
subjects:
- kind: ServiceAccount
name: console-sa
namespace: {{ .Release.Namespace }}
7 changes: 7 additions & 0 deletions helm/operator/templates/console-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: console-env
data:
CONSOLE_PORT: "9090"
CONSOLE_TLS_PORT: "9443"
7 changes: 7 additions & 0 deletions helm/operator/templates/console-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: console-sa-secret
annotations:
kubernetes.io/service-account.name: console-sa
type: kubernetes.io/service-account-token
2 changes: 1 addition & 1 deletion helm/operator/templates/console-service.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: "console"
name: console
labels: {{- include "minio-operator.labels" . | nindent 4 }}
spec:
ports:
Expand Down
4 changes: 4 additions & 0 deletions helm/operator/templates/console-serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: console-sa
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ rules:
- create
- apiGroups:
- minio.min.io
- sts.min.io
resources:
- "*"
verbs:
- "*"
- apiGroups:
- min.io
- sts.min.io
resources:
- "*"
verbs:
Expand Down Expand Up @@ -175,4 +175,4 @@ rules:
- list
- patch
- update
- deletecollection
- deletecollection
2 changes: 1 addition & 1 deletion helm/operator/templates/operator-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: "minio-operator"
name: minio-operator
labels: {{- include "minio-operator.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.operator.replicaCount }}
Expand Down
14 changes: 1 addition & 13 deletions helm/operator/templates/operator-service.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: "operator"
name: operator
labels: {{- include "minio-operator.labels" . | nindent 4 }}
spec:
type: ClusterIP
Expand All @@ -11,15 +11,3 @@ spec:
selector:
operator: leader
{{- include "minio-operator.selectorLabels" . | nindent 4 }}
---
apiVersion: v1
kind: Service
metadata:
name: "sts"
labels: {{- include "minio-operator.labels" . | nindent 4 }}
spec:
type: ClusterIP
ports:
- port: 4223
name: https
selector: {{- include "minio-operator.selectorLabels" . | nindent 4 }}
File renamed without changes.
11 changes: 11 additions & 0 deletions helm/operator/templates/sts-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: sts
labels: {{- include "minio-operator.labels" . | nindent 4 }}
spec:
type: ClusterIP
ports:
- port: 4223
name: https
selector: {{- include "minio-operator.selectorLabels" . | nindent 4 }}
2 changes: 2 additions & 0 deletions helm/operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ operator:
# value: "cluster.domain"
# - name: WATCHED_NAMESPACE
# value: ""
# - name: MINIO_OPERATOR_RUNTIME
# value: "OpenShift"
image:
repository: quay.io/minio/operator
tag: v5.0.6
Expand Down

0 comments on commit de854db

Please sign in to comment.