-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate ace-cluster-info confgimap in spoke chart
Signed-off-by: Tamal Saha <[email protected]>
- Loading branch information
Showing
7 changed files
with
43 additions
and
862 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,25 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: {{ include "cluster-manager-spoke.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "cluster-manager-spoke.labels" . | nindent 4 }} | ||
name: cluster-info-generator | ||
namespace: open-cluster-management | ||
annotations: | ||
"helm.sh/hook": post-install,post-upgrade,post-rollback | ||
spec: | ||
ttlSecondsAfterFinished: 0 | ||
backoffLimit: 3 | ||
template: | ||
spec: | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
serviceAccountName: {{ include "cluster-manager-spoke.serviceAccountName" . }} | ||
securityContext: | ||
{{- toYaml .Values.podSecurityContext | nindent 8 }} | ||
serviceAccountName: klusterlet | ||
automountServiceAccountToken: true | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
securityContext: | ||
{{- toYaml .Values.securityContext | nindent 12 }} | ||
image: {{ .Values.kubectl.image }} | ||
imagePullPolicy: {{ .Values.kubectl.pullPolicy }} | ||
command: | ||
- sh | ||
- -c | ||
- | | ||
set -x; \ | ||
sleep 2; \ | ||
ns={{ default .Release.Namespace $.Values.secret.namespace }}; \ | ||
kubectl get ns $ns|| kubectl create ns $ns; \ | ||
kubectl apply -f - <<EOF | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ $.Values.secret.name }} | ||
namespace: {{ default .Release.Namespace $.Values.secret.namespace }} | ||
labels: | ||
{{- include "cluster-manager-spoke.labels" $ | nindent 20 }} | ||
stringData: | ||
values.yaml: | | ||
clusterMetadata: {{ $.Values.clusterMetadata | toJson }} | ||
EOF | ||
resources: | ||
{{- toYaml .Values.resources | nindent 12 }} | ||
- name: clusteradm | ||
image: ghcr.io/kluster-manager/clusteradm:{{ default .Chart.AppVersion .Values.bundleVersion.clusteradmImageVersion }} | ||
imagePullPolicy: Always | ||
args: | ||
- /clusteradm | ||
- get | ||
- cluster-info | ||
- --cluster-name={{ .Values.clusterMetadata.name }} | ||
- --store-to-configmap={{ default .Release.Namespace .Values.secret.namespace }}/{{ .Values.secret.name }} | ||
restartPolicy: Never | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} |
Oops, something went wrong.