Skip to content

Commit

Permalink
Merge pull request #140 from catpineapple/helm_modify
Browse files Browse the repository at this point in the history
[helm]  helm complete functions
  • Loading branch information
intelligentfu authored Apr 7, 2024
2 parents bca4433 + d301561 commit 9653bad
Show file tree
Hide file tree
Showing 13 changed files with 378 additions and 29 deletions.
4 changes: 2 additions & 2 deletions helm-charts/doris-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.4.1
version: 1.5.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.4.1"
appVersion: "1.5.0"


sources:
Expand Down
170 changes: 158 additions & 12 deletions helm-charts/doris-operator/crds/doris.selectdb.com_dorisclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ spec:
description: password, login to doris db.
type: string
type: object
authSecret:
description: the name of secret that type is `kubernetes.io/basic-auth`
and contains keys username, password for management doris node in
cluster as fe, be register. the password key is `password`. the
username defaults to `root` and is omitempty.
type: string
beSpec:
description: defines the be cluster state pod that will be created
by operator.
Expand Down Expand Up @@ -964,10 +970,36 @@ spec:
description: the reference for cn configMap.
properties:
configMapName:
description: the config info for start progress.
description: ConfigMapName mapped the configuration files
in the doris 'conf/' directory. such as 'fe.conf', 'be.conf'.
If HDFS access is involved, there may also be 'core-site.xml'
and other files. doris-operator mounts these configuration
files in the '/etc/doris' directory by default. links them
to the 'conf/' directory of the doris component through
soft links.
type: string
configMaps:
description: ConfigMaps can mount multiple configmaps to the
specified path. The mounting path of configmap cannot be
repeated.
items:
properties:
configMapName:
description: name of configmap that needs to mount.
type: string
mountPath:
description: Current ConfigMap Mount Path. If MountConfigMapInfo
belongs to the same ConfigMapInfo, their MountPath
cannot be repeated.
type: string
type: object
type: array
resolveKey:
description: the config response key in configmap.
description: 'Deprecated: This configuration has been abandoned
and will be cleared in version 1.7.0. It is currently forced
to be ''fe.conf'', ''be.conf'', ''apache_hdfs_broker.conf''
It is no longer effective. the configuration content will
not take effect.'
type: string
type: object
envVars:
Expand Down Expand Up @@ -1424,8 +1456,17 @@ spec:
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
service:
description: expose the be listen ports
description: 'expose doris components for accessing. example:
if you want to use `stream load` to load data into doris out
k8s, you can use be service and config different service type
for loading data.'
properties:
annotations:
additionalProperties:
type: string
description: Annotations for using function on different cloud
platform.
type: object
loadBalancerIP:
description: 'Only applies to Service Type: LoadBalancer.
This feature depends on whether the underlying cloud-provider
Expand Down Expand Up @@ -2444,10 +2485,36 @@ spec:
description: the reference for cn configMap.
properties:
configMapName:
description: the config info for start progress.
description: ConfigMapName mapped the configuration files
in the doris 'conf/' directory. such as 'fe.conf', 'be.conf'.
If HDFS access is involved, there may also be 'core-site.xml'
and other files. doris-operator mounts these configuration
files in the '/etc/doris' directory by default. links them
to the 'conf/' directory of the doris component through
soft links.
type: string
configMaps:
description: ConfigMaps can mount multiple configmaps to the
specified path. The mounting path of configmap cannot be
repeated.
items:
properties:
configMapName:
description: name of configmap that needs to mount.
type: string
mountPath:
description: Current ConfigMap Mount Path. If MountConfigMapInfo
belongs to the same ConfigMapInfo, their MountPath
cannot be repeated.
type: string
type: object
type: array
resolveKey:
description: the config response key in configmap.
description: 'Deprecated: This configuration has been abandoned
and will be cleared in version 1.7.0. It is currently forced
to be ''fe.conf'', ''be.conf'', ''apache_hdfs_broker.conf''
It is no longer effective. the configuration content will
not take effect.'
type: string
type: object
envVars:
Expand Down Expand Up @@ -2910,8 +2977,17 @@ spec:
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
service:
description: expose the be listen ports
description: 'expose doris components for accessing. example:
if you want to use `stream load` to load data into doris out
k8s, you can use be service and config different service type
for loading data.'
properties:
annotations:
additionalProperties:
type: string
description: Annotations for using function on different cloud
platform.
type: object
loadBalancerIP:
description: 'Only applies to Service Type: LoadBalancer.
This feature depends on whether the underlying cloud-provider
Expand Down Expand Up @@ -4609,10 +4685,36 @@ spec:
description: the reference for cn configMap.
properties:
configMapName:
description: the config info for start progress.
description: ConfigMapName mapped the configuration files
in the doris 'conf/' directory. such as 'fe.conf', 'be.conf'.
If HDFS access is involved, there may also be 'core-site.xml'
and other files. doris-operator mounts these configuration
files in the '/etc/doris' directory by default. links them
to the 'conf/' directory of the doris component through
soft links.
type: string
configMaps:
description: ConfigMaps can mount multiple configmaps to the
specified path. The mounting path of configmap cannot be
repeated.
items:
properties:
configMapName:
description: name of configmap that needs to mount.
type: string
mountPath:
description: Current ConfigMap Mount Path. If MountConfigMapInfo
belongs to the same ConfigMapInfo, their MountPath
cannot be repeated.
type: string
type: object
type: array
resolveKey:
description: the config response key in configmap.
description: 'Deprecated: This configuration has been abandoned
and will be cleared in version 1.7.0. It is currently forced
to be ''fe.conf'', ''be.conf'', ''apache_hdfs_broker.conf''
It is no longer effective. the configuration content will
not take effect.'
type: string
type: object
envVars:
Expand Down Expand Up @@ -5069,8 +5171,17 @@ spec:
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
service:
description: expose the be listen ports
description: 'expose doris components for accessing. example:
if you want to use `stream load` to load data into doris out
k8s, you can use be service and config different service type
for loading data.'
properties:
annotations:
additionalProperties:
type: string
description: Annotations for using function on different cloud
platform.
type: object
loadBalancerIP:
description: 'Only applies to Service Type: LoadBalancer.
This feature depends on whether the underlying cloud-provider
Expand Down Expand Up @@ -6090,10 +6201,36 @@ spec:
description: the reference for cn configMap.
properties:
configMapName:
description: the config info for start progress.
description: ConfigMapName mapped the configuration files
in the doris 'conf/' directory. such as 'fe.conf', 'be.conf'.
If HDFS access is involved, there may also be 'core-site.xml'
and other files. doris-operator mounts these configuration
files in the '/etc/doris' directory by default. links them
to the 'conf/' directory of the doris component through
soft links.
type: string
configMaps:
description: ConfigMaps can mount multiple configmaps to the
specified path. The mounting path of configmap cannot be
repeated.
items:
properties:
configMapName:
description: name of configmap that needs to mount.
type: string
mountPath:
description: Current ConfigMap Mount Path. If MountConfigMapInfo
belongs to the same ConfigMapInfo, their MountPath
cannot be repeated.
type: string
type: object
type: array
resolveKey:
description: the config response key in configmap.
description: 'Deprecated: This configuration has been abandoned
and will be cleared in version 1.7.0. It is currently forced
to be ''fe.conf'', ''be.conf'', ''apache_hdfs_broker.conf''
It is no longer effective. the configuration content will
not take effect.'
type: string
type: object
electionNumber:
Expand Down Expand Up @@ -6555,8 +6692,17 @@ spec:
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
service:
description: expose the be listen ports
description: 'expose doris components for accessing. example:
if you want to use `stream load` to load data into doris out
k8s, you can use be service and config different service type
for loading data.'
properties:
annotations:
additionalProperties:
type: string
description: Annotations for using function on different cloud
platform.
type: object
loadBalancerIP:
description: 'Only applies to Service Type: LoadBalancer.
This feature depends on whether the underlying cloud-provider
Expand Down
2 changes: 2 additions & 0 deletions helm-charts/doris-operator/templates/namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
apiVersion: v1
kind: Namespace
metadata:
annotations:
"helm.sh/resource-policy": keep
labels:
control-plane: {{ template "kube-doris.name" . }}-operator
app.kubernetes.io/name: namespace
Expand Down
4 changes: 2 additions & 2 deletions helm-charts/doris/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.4.1
version: 1.5.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "2.0.4"
appVersion: "2.1.0"


sources:
Expand Down
40 changes: 39 additions & 1 deletion helm-charts/doris/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ doris cluster pod default resource.
{{- end }}


{{/*
doris cluster admin user and password secret name.
*/}}
{{- define "doriscluster.secret.name" -}}
{{ template "doriscluster.name" . }}-secret-base64
{{- end -}}

{{/*
doris cluster fe configMap default name.
Expand Down Expand Up @@ -207,4 +213,36 @@ doris cluster broker PVC
requests:
storage: {{ .Values.brokerSpec.persistentVolumeClaim.logsPersistentVolume.storage}}
{{- end }}
{{- end -}}
{{- end -}}


{{- define "doriscluster.feConfig.configMaps" }}
{{- range .Values.feSpec.configMap.mountConfigMaps }}
- configMapName: {{ .configMapName }}
mountPath: {{ .mountPath }}
{{- end }}
{{- end }}


{{- define "doriscluster.beConfig.configMaps" }}
{{- range .Values.beSpec.configMap.mountConfigMaps }}
- configMapName: {{ .configMapName }}
mountPath: {{ .mountPath }}
{{- end }}
{{- end }}


{{- define "doriscluster.cnConfig.configMaps" }}
{{- range .Values.cnSpec.configMap.mountConfigMaps }}
- configMapName: {{ .configMapName }}
mountPath: {{ .mountPath }}
{{- end }}
{{- end }}


{{- define "doriscluster.brokerConfig.configMaps" }}
{{- range .Values.brokerSpec.configMap.mountConfigMaps }}
- configMapName: {{ .configMapName }}
mountPath: {{ .mountPath }}
{{- end }}
{{- end }}
5 changes: 3 additions & 2 deletions helm-charts/doris/templates/configmap-be.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.beSpec.configMap }}
{{- $originalMap := omit .Values.beSpec.configMap "mountConfigMaps" }}
{{- if $originalMap }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -9,5 +10,5 @@ metadata:
app.kubernetes.io/instance: {{ template "doriscluster.name" . }}
app.kubernetes.io/part-of: {{ template "kube-control.name" . }}
data:
{{- toYaml .Values.beSpec.configMap | nindent 2 }}
{{- toYaml $originalMap | nindent 2}}
{{- end }}
5 changes: 3 additions & 2 deletions helm-charts/doris/templates/configmap-broker.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.brokerSpec.configMap }}
{{- $originalMap := omit .Values.brokerSpec.configMap "mountConfigMaps" }}
{{- if $originalMap }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -9,5 +10,5 @@ metadata:
app.kubernetes.io/instance: {{ template "doriscluster.name" . }}
app.kubernetes.io/part-of: {{ template "kube-control.name" . }}
data:
{{- toYaml .Values.brokerSpec.configMap | nindent 2 }}
{{- toYaml $originalMap | nindent 2}}
{{- end }}
5 changes: 3 additions & 2 deletions helm-charts/doris/templates/configmap-cn.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.cnSpec.configMap }}
{{- $originalMap := omit .Values.cnSpec.configMap "mountConfigMaps" }}
{{- if $originalMap }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -9,5 +10,5 @@ metadata:
app.kubernetes.io/instance: {{ template "doriscluster.name" . }}
app.kubernetes.io/part-of: {{ template "kube-control.name" . }}
data:
{{- toYaml .Values.cnSpec.configMap | nindent 2 }}
{{- toYaml $originalMap | nindent 2}}
{{- end }}
5 changes: 3 additions & 2 deletions helm-charts/doris/templates/configmap-fe.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.feSpec.configMap }}
{{- $originalMap := omit .Values.feSpec.configMap "mountConfigMaps" }}
{{- if $originalMap }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -9,5 +10,5 @@ metadata:
app.kubernetes.io/instance: {{ template "doriscluster.name" . }}
app.kubernetes.io/part-of: {{ template "kube-control.name" . }}
data:
{{- toYaml .Values.feSpec.configMap | nindent 2}}
{{- toYaml $originalMap | nindent 2}}
{{- end }}
Loading

0 comments on commit 9653bad

Please sign in to comment.