Skip to content

Commit

Permalink
chore: remove the rerender at h/v-scale of etcd (#1367)
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-inf authored Dec 26, 2024
1 parent a0a66f5 commit c1eccaf
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 87 deletions.
3 changes: 0 additions & 3 deletions addons/etcd/opsdefinitions/defragmentation.yaml

This file was deleted.

15 changes: 4 additions & 11 deletions addons/etcd/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -84,24 +84,17 @@ Define etcd component definition regular expression name prefix
{{- end -}}

{{/*
Define etcd 3.X component configuration template name
Define etcd 3.X component config template name
*/}}
{{- define "etcd3.configurationTemplate" -}}
{{- define "etcd3.configTemplate" -}}
etcd3-config-template-{{ .Chart.Version }}
{{- end }}

{{/*
Define etcd 3.X component config constriant name
*/}}
{{- define "etcd3.configConstraint" -}}
etcd3-config-constraints
{{- end }}

{{/*
Define etcd 3.X component script template name
*/}}
{{- define "etcd3.scriptsTemplate" -}}
etcd3-scripts-template-{{.Chart.Version}}
{{- define "etcd3.scriptTemplate" -}}
etcd3-script-template-{{.Chart.Version}}
{{- end }}

{{/*
Expand Down
14 changes: 5 additions & 9 deletions addons/etcd/templates/cmpd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,18 +183,14 @@ spec:
- -c
- /scripts/data-load.sh
configs:
- name: etcd-configuration-tpl
templateRef: {{ include "etcd3.configurationTemplate" .}}
constraintRef: {{ include "etcd3.configConstraint" .}}
- name: etcd-config
templateRef: {{ include "etcd3.configTemplate" .}}
namespace: {{ .Release.Namespace }}
volumeName: config
defaultMode: 0666
reRenderResourceTypes:
- hscale
- vscale
scripts:
- name: etcd-scripts
templateRef: {{ include "etcd3.scriptsTemplate" .}}
- name: etcd-script
templateRef: {{ include "etcd3.scriptTemplate" .}}
namespace: {{ .Release.Namespace }}
volumeName: scripts
defaultMode: 0555
defaultMode: 0555
2 changes: 1 addition & 1 deletion addons/etcd/templates/config-template.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "etcd3.configurationTemplate" . }}
name: {{ include "etcd3.configTemplate" . }}
labels:
{{- include "etcd.labels" . | nindent 4 }}
annotations:
Expand Down
61 changes: 0 additions & 61 deletions addons/etcd/templates/configconstraint.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "etcd3.scriptsTemplate" . }}
name: {{ include "etcd3.scriptTemplate" . }}
labels:
{{- include "etcd.labels" . | nindent 4 }}
annotations:
Expand All @@ -14,4 +14,4 @@ data:
{{- include "kblib.strings.is_empty" $ | nindent 4 }}
{{- with include "etcd.extend.scripts" . }}
{{- . | nindent 2 }}
{{- end }}
{{- end }}

0 comments on commit c1eccaf

Please sign in to comment.