Skip to content

Commit 5bd0469

Browse files
authored
Merge pull request apache#452 from jonasbrami/minor_helm_chart_improvements
Minor helm chart improvements
2 parents 9f404f3 + 1b27e5c commit 5bd0469

File tree

5 files changed

+40
-1
lines changed

5 files changed

+40
-1
lines changed

helm-charts/doris-operator/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,7 @@ spec:
141141
nodeSelector:
142142
{{- toYaml .Values.dorisOperator.nodeSelector | nindent 8 }}
143143
{{- end }}
144+
{{- if .Values.dorisOperator.tolerations }}
145+
tolerations:
146+
{{- toYaml .Values.dorisOperator.tolerations | nindent 8 }}
147+
{{- end }}

helm-charts/doris-operator/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ dorisOperator:
3131
# kubernetes.io/arch: amd64
3232
# kubernetes.io/os: linux
3333
# app.kubernetes.node.name: "k8s-node1"
34+
tolerations: []
35+
# tolerations for operator pod assignment
36+
# - key: "example-key"
37+
# operator: "Equal"
38+
# value: "example-value"
39+
# effect: "NoSchedule"
3440
resources: {}
3541
# resources used to specify compute resources, default is 2c 4Gi, the resource follow k8s requests and limits config.(https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#requests-and-limits)
3642
# requests:

helm-charts/doris/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,26 @@ Observe that the Pod of `doriscluster` is in the `Running` state and all contain
5555
doriscluster-helm-be-2 1/1 Running 0 16s
5656
```
5757

58+
## Authentication Options
59+
60+
The chart supports three authentication methods (in order of precedence):
61+
1. `adminUser` - Plain text credentials (not recommended)
62+
2. `authSecret` - Helm creates a secret from base64 values
63+
3. `authSecretName` - Reference an existing secret (recommended)
64+
65+
### Using External Secret (Recommended)
66+
```bash
67+
# Create secret
68+
kubectl create secret generic doris-auth \
69+
--type=kubernetes.io/basic-auth \
70+
--from-literal=username=root \
71+
--from-literal=password='your-password'
72+
73+
# Reference in values.yaml
74+
dorisCluster:
75+
authSecretName: "doris-auth"
76+
```
77+
5878
## Uninstall doriscluster
5979
Please confirm the Doris is not used, when using next command to uninstall `doriscluster`.
6080
```bash

helm-charts/doris/templates/doriscluster.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ spec:
3636
{{- toYaml .Values.dorisCluster.adminUser | nindent 4 }}
3737
{{- else if .Values.dorisCluster.authSecret }}
3838
authSecret: {{ template "doriscluster.secret.name" . }}
39+
{{- else if .Values.dorisCluster.authSecretName }}
40+
# Reference an existing secret
41+
authSecret: {{ .Values.dorisCluster.authSecretName }}
3942
{{- end }}
4043
feSpec:
4144
{{- if .Values.feSpec.annotations }}

helm-charts/doris/values.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ dorisCluster:
3434
adminUser: {}
3535
# name: root
3636
# password: "12345"
37-
# use authSecret can encrypt and save passwords, recommend this method
37+
# Option 1: Reference an existing secret
38+
# Use this when you have created a secret outside of this Helm chart
39+
# Example: kubectl create secret generic doris-auth --type=kubernetes.io/basic-auth --from-literal=username=root --from-literal=password='your-password'
40+
authSecretName: ""
41+
# Example: authSecretName: "doris-auth"
42+
43+
# Option 2: use authSecret can encrypt and save passwords
3844
# 1. run shell: echo -n '{your_password}' | base64 to get password base64 string
3945
# 2. run shell: echo -n '{your_user}' | base64 to get user base64 string
4046
# 3. Fill the encrypted string into the corresponding position

0 commit comments

Comments
 (0)