Skip to content

Commit

Permalink
fix invalid helm chart
Browse files Browse the repository at this point in the history
Signed-off-by: chaosi-zju <[email protected]>
  • Loading branch information
chaosi-zju committed Sep 6, 2023
1 parent 7c96e0d commit 7ce81f3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/lint-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ jobs:
with:
version: ${{ env.HELM_VERSION }}

- name: Run chart-testing (template)
run: |
helm template --set components={"search,descheduler,schedulerEstimator"} --dependency-update ./charts/karmada --debug > /dev/null
helm template --set components={"search,descheduler,schedulerEstimator"},installMode=component --dependency-update ./charts/karmada --debug > /dev/null
helm template --set installMode=agent --dependency-update ./charts/karmada --debug > /dev/null
helm template --dependency-update ./charts/karmada-operator --debug > /dev/null
# Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and
# yamllint (https://github.com/adrienverge/yamllint) which require Python
- name: Set up Python
Expand Down
4 changes: 4 additions & 0 deletions charts/karmada/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ app: {{- include "karmada.name" .}}-search
secret:
secretName: {{ .Values.search.kubeconfig }}
{{- end -}}
{{- end -}}

{{- define "karmada.search.etcd.cert.volume" -}}
{{ $name := include "karmada.name" . }}
- name: etcd-certs
secret:
{{- if eq .Values.etcd.mode "internal" }}
Expand Down
4 changes: 3 additions & 1 deletion charts/karmada/templates/karmada-search.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ spec:
{{- toYaml .Values.apiServer.resources | nindent 12 }}
volumes:
{{- include "karmada.search.kubeconfig.volume" . | nindent 8 }}
{{- include "karmada.search.etcd.cert.volume" . | nindent 8 }}
---
apiVersion: v1
kind: Service
Expand Down Expand Up @@ -165,7 +166,8 @@ spec:
- name: {{ $name }}-search-apiservice
configMap:
name: {{ $name }}-search-apiservice
{{ include "karmada.search.kubeconfig.volume" . | nindent 8 }}
{{- include "karmada.search.kubeconfig.volume" . | nindent 8 }}
{{- include "karmada.search.etcd.cert.volume" . | nindent 8 }}
{{- end }}

{{ if .Values.search.podDisruptionBudget }}
Expand Down

0 comments on commit 7ce81f3

Please sign in to comment.