Skip to content

Commit 9f2f6c7

Browse files
committed
fix(marketplace): update annotate-nodes job to run as a helm hook
Signed-off-by: Vaughn Dice <[email protected]>
1 parent f946976 commit 9f2f6c7

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
apiVersion: batch/v1
22
kind: Job
33
metadata:
4-
name: kwasm-annotate-nodes
4+
name: "{{ .Release.Name }}-kwasm-annotate-nodes"
5+
annotations:
6+
"helm.sh/hook": post-install
7+
"helm.sh/hook-weight": "-4"
8+
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
59
spec:
610
template:
711
metadata:
8-
name: kwasm-annotate-nodes
12+
name: "{{ .Release.Name }}-kwasm-annotate-nodes"
913
spec:
10-
serviceAccountName: kwasm-annotate-sa
14+
serviceAccountName: "{{ .Release.Name }}-kwasm-annotate-sa"
1115
containers:
1216
- name: kubectl
1317
image: {{ printf "%s/%s:%s" .Values.global.azure.images.kubectl.registry .Values.global.azure.images.kubectl.image .Values.global.azure.images.kubectl.tag }}
@@ -18,12 +22,12 @@ spec:
1822
apiVersion: v1
1923
kind: ServiceAccount
2024
metadata:
21-
name: kwasm-annotate-sa
25+
name: "{{ .Release.Name }}-kwasm-annotate-sa"
2226
---
2327
apiVersion: rbac.authorization.k8s.io/v1
2428
kind: ClusterRole
2529
metadata:
26-
name: kwasm-annotate-clusterrole
30+
name: "{{ .Release.Name }}-kwasm-annotate-clusterrole"
2731
rules:
2832
- apiGroups: [""]
2933
resources: ["nodes"]
@@ -32,12 +36,12 @@ rules:
3236
apiVersion: rbac.authorization.k8s.io/v1
3337
kind: ClusterRoleBinding
3438
metadata:
35-
name: kwasm-annotate-clusterrolebinding
39+
name: "{{ .Release.Name }}-kwasm-annotate-clusterrolebinding"
3640
roleRef:
3741
apiGroup: rbac.authorization.k8s.io
3842
kind: ClusterRole
39-
name: kwasm-annotate-clusterrole
43+
name: "{{ .Release.Name }}-kwasm-annotate-clusterrole"
4044
subjects:
4145
- kind: ServiceAccount
42-
name: kwasm-annotate-sa
46+
name: "{{ .Release.Name }}-kwasm-annotate-sa"
4347
namespace: {{ .Release.Namespace }}

0 commit comments

Comments
 (0)