Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
{{- if .Values.starrocksOperator.enabled }}
{{- $operatorLabels := .Values.starrocksOperator.labels | default dict }}
{{- if not (kindIs "map" $operatorLabels) }}
{{- fail "starrocksOperator.labels must be a map" }}
{{- end }}
{{- range $reservedLabel := list "app" "version" "app.kubernetes.io/managed-by" }}
Comment thread
kevincai marked this conversation as resolved.
Resolved
{{- if hasKey $operatorLabels $reservedLabel }}
{{- fail (printf "starrocksOperator.labels cannot override reserved label %q" $reservedLabel) }}
{{- end }}
{{- end }}
{{- range $key, $value := $operatorLabels }}
{{- if or (kindIs "map" $value) (kindIs "slice" $value) (kindIs "invalid" $value) }}
{{- fail (printf "starrocksOperator.labels value for %q must be a string, number, or boolean" $key) }}
{{- end }}
{{- end }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "operator.name" . }}-operator
namespace: {{ template "operator.namespace" . }}
labels:
app: {{ template "operator.name" . }}-operator
{{- range $key, $value := $operatorLabels }}
{{ $key | quote }}: {{ $value | quote }}
{{- end }}
{{- if .Values.starrocksOperator.annotations }}
annotations:
{{- toYaml .Values.starrocksOperator.annotations | nindent 4 }}
Expand All @@ -25,6 +42,9 @@ spec:
labels:
app: {{ template "operator.name" . }}-operator
version: {{ $.Chart.Version }}
{{- range $key, $value := $operatorLabels }}
{{ $key | quote }}: {{ $value | quote }}
{{- end }}
spec:
automountServiceAccountToken: true
{{- if .Values.starrocksOperator.imagePullSecrets }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ starrocksOperator:
# If enabled, the operator-related resources will be created, including the operator deployment, service account,
# clusterrole, clusterrolebinding, and service account.
enabled: true
# labels for the starrocks operator Deployment and pod. Values must be strings, numbers, or booleans
# and are rendered as strings. The "app", "version", and "app.kubernetes.io/managed-by" keys are reserved.
Comment thread
kevincai marked this conversation as resolved.
Resolved
labels: {}
# annotations for starrocks operator.
annotations: {}
namespaceOverride: ""
Expand Down Expand Up @@ -127,4 +130,4 @@ starrocksOperator:
# By default, the volume name of secret and configmap created by operator for the FE/BE/CN pods has a hash suffix.
# If users plan to use a sidecar or init container to mount the same volume, it will be challenging to get the volume name.
# In this situation, you can set this value to false.
volumeNameWithHash: true
volumeNameWithHash: true
3 changes: 3 additions & 0 deletions helm-charts/charts/kube-starrocks/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ operator:
# If enabled, the operator-related resources will be created, including the operator deployment, service account,
# clusterrole, clusterrolebinding, and service account.
enabled: true
# labels for the starrocks operator Deployment and pod. Values must be strings, numbers, or booleans
# and are rendered as strings. The "app", "version", and "app.kubernetes.io/managed-by" keys are reserved.
Comment thread
kevincai marked this conversation as resolved.
Resolved
labels: {}
# annotations for starrocks operator.
annotations: {}
namespaceOverride: ""
Expand Down
Loading