Add chart starrocks-operator/1.11.0
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
Thank you for installing {{ .Chart.Name }}-{{ .Chart.Version }} operator chart.
|
||||
|
||||
Please see the values.yaml for more operation information: https://github.com/StarRocks/starrocks-kubernetes-operator/blob/main/helm-charts/charts/kube-starrocks/charts/operator/values.yaml
|
||||
@@ -0,0 +1,14 @@
|
||||
{{/*
|
||||
The default service account name to use for the operator.
|
||||
*/}}
|
||||
{{- define "operator.serviceAccountName" -}}
|
||||
{{- default "starrocks" .Values.global.rbac.serviceAccount.name }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "operator.namespace" -}}
|
||||
{{- default .Release.Namespace .Values.starrocksOperator.namespaceOverride }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "operator.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride -}}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,73 @@
|
||||
{{- if and .Values.starrocksOperator.enabled .Values.global.rbac.create }}
|
||||
{{- if .Values.starrocksOperator.watchNamespace | not }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ template "operator.name" . }}-operator
|
||||
labels:
|
||||
app: {{ template "operator.name" . }}-operator
|
||||
rules:
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- deployments
|
||||
- statefulsets
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- autoscaling
|
||||
resources:
|
||||
- horizontalpodautoscalers
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- batch
|
||||
resources:
|
||||
- cronjobs
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
- serviceaccounts
|
||||
- services
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- endpoints
|
||||
- pods
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- starrocks.com
|
||||
resources:
|
||||
- starrocksclusters
|
||||
- starrockswarehouses
|
||||
verbs:
|
||||
- '*'
|
||||
# when deploying to OpenShift, the following permission is also necessary
|
||||
- apiGroups:
|
||||
- starrocks.com
|
||||
resources:
|
||||
- starrocksclusters/finalizers
|
||||
- starrockswarehouses/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- starrocks.com
|
||||
resources:
|
||||
- starrocksclusters/status
|
||||
- starrockswarehouses/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,16 @@
|
||||
{{ if and .Values.starrocksOperator.enabled .Values.global.rbac.create }}
|
||||
{{- if .Values.starrocksOperator.watchNamespace | not }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ template "operator.name" . }}-operator
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ template "operator.name" . }}-operator
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "operator.serviceAccountName" . }}
|
||||
namespace: {{ template "operator.namespace" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,89 @@
|
||||
{{- if .Values.starrocksOperator.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "operator.name" . }}-operator
|
||||
namespace: {{ template "operator.namespace" . }}
|
||||
labels:
|
||||
app: {{ template "operator.name" . }}-operator
|
||||
{{- if .Values.starrocksOperator.annotations }}
|
||||
annotations:
|
||||
{{- toYaml .Values.starrocksOperator.annotations | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "operator.name" . }}-operator
|
||||
replicas: {{ .Values.starrocksOperator.replicaCount }}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kubectl.kubernetes.io/default-container: manager
|
||||
{{- if .Values.starrocksOperator.annotations }}
|
||||
{{- toYaml .Values.starrocksOperator.annotations | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app: {{ template "operator.name" . }}-operator
|
||||
version: {{ $.Chart.Version }}
|
||||
spec:
|
||||
automountServiceAccountToken: true
|
||||
{{- if .Values.starrocksOperator.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml .Values.starrocksOperator.imagePullSecrets | nindent 6 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- command:
|
||||
- /sroperator
|
||||
args:
|
||||
- --leader-elect
|
||||
{{- toYaml .Values.starrocksOperator.log | nindent 8 }}
|
||||
{{- if .Values.starrocksOperator.watchNamespace }}
|
||||
- --namespace={{ .Values.starrocksOperator.watchNamespace }}
|
||||
{{- end }}
|
||||
{{- if .Values.starrocksOperator.dnsDomainSuffix }}
|
||||
- --dns-domain-suffix={{ .Values.starrocksOperator.dnsDomainSuffix }}
|
||||
{{- end }}
|
||||
- --volume-name-with-hash={{ .Values.starrocksOperator.volumeNameWithHash }}
|
||||
env:
|
||||
- name: TZ
|
||||
value: {{ .Values.timeZone }}
|
||||
{{- if .Values.starrocksOperator.env }}
|
||||
{{- toYaml .Values.starrocksOperator.env | nindent 8 }}
|
||||
{{- end }}
|
||||
image: "{{ .Values.starrocksOperator.image.repository }}:{{ .Values.starrocksOperator.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.starrocksOperator.imagePullPolicy }}
|
||||
name: manager
|
||||
{{- if .Values.starrocksOperator.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.starrocksOperator.securityContext | nindent 10 }}
|
||||
{{- end }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8081
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 20
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /readyz
|
||||
port: 8081
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
|
||||
resources:
|
||||
{{- toYaml .Values.starrocksOperator.resources | nindent 10 }}
|
||||
serviceAccountName: {{ template "operator.serviceAccountName" . }}
|
||||
terminationGracePeriodSeconds: 10
|
||||
{{- if .Values.starrocksOperator.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml .Values.starrocksOperator.nodeSelector | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.starrocksOperator.affinity }}
|
||||
affinity:
|
||||
{{- toYaml .Values.starrocksOperator.affinity | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.starrocksOperator.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml .Values.starrocksOperator.tolerations | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,15 @@
|
||||
{{ if and .Values.starrocksOperator.enabled .Values.global.rbac.create }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: cn-leader-election-rolebinding
|
||||
namespace: {{ template "operator.namespace" . }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: cn-leader-election-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "operator.serviceAccountName" . }}
|
||||
namespace: {{ template "operator.namespace" . }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
{{ if and .Values.starrocksOperator.enabled .Values.global.rbac.create }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: cn-leader-election-role
|
||||
namespace: {{ template "operator.namespace" . }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
{{- end }}
|
||||
@@ -0,0 +1,74 @@
|
||||
{{- if and .Values.starrocksOperator.enabled .Values.global.rbac.create }}
|
||||
{{- if .Values.starrocksOperator.watchNamespace }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ template "operator.name" . }}-operator
|
||||
namespace: {{ template "operator.namespace" . }}
|
||||
labels:
|
||||
app: {{ template "operator.name" . }}-operator
|
||||
rules:
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- deployments
|
||||
- statefulsets
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- autoscaling
|
||||
resources:
|
||||
- horizontalpodautoscalers
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- batch
|
||||
resources:
|
||||
- cronjobs
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
- serviceaccounts
|
||||
- services
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- endpoints
|
||||
- pods
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- starrocks.com
|
||||
resources:
|
||||
- starrocksclusters
|
||||
- starrockswarehouses
|
||||
verbs:
|
||||
- '*'
|
||||
# when deploying to OpenShift, the following permission is also necessary
|
||||
- apiGroups:
|
||||
- starrocks.com
|
||||
resources:
|
||||
- starrocksclusters/finalizers
|
||||
- starrockswarehouses/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- starrocks.com
|
||||
resources:
|
||||
- starrocksclusters/status
|
||||
- starrockswarehouses/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,17 @@
|
||||
{{- if and .Values.starrocksOperator.enabled .Values.global.rbac.create }}
|
||||
{{- if .Values.starrocksOperator.watchNamespace }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ template "operator.name" . }}-operator
|
||||
namespace: {{ template "operator.namespace" . }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ template "operator.name" . }}-operator
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "operator.serviceAccountName" . }}
|
||||
namespace: {{ template "operator.namespace" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,15 @@
|
||||
{{- if and .Values.starrocksOperator.enabled .Values.global.rbac.create }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ template "operator.serviceAccountName" . }}
|
||||
namespace: {{ template "operator.namespace" . }}
|
||||
{{- with .Values.global.rbac.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.global.rbac.serviceAccount.labels }}
|
||||
labels:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user