diff --git a/charts/rancher/templates/preinstallHook/create-tls-ca-job.yaml b/charts/rancher/templates/preinstallHook/create-tls-ca-job.yaml index 912c4fc..deeedc3 100644 --- a/charts/rancher/templates/preinstallHook/create-tls-ca-job.yaml +++ b/charts/rancher/templates/preinstallHook/create-tls-ca-job.yaml @@ -2,7 +2,8 @@ apiVersion: batch/v1 kind: Job metadata: - name: create-tls-ca-job + name: {{ template "rancher.fullname" . }}-create-tls-ca-job + labels: {{ include "rancher.labels" . | nindent 4 }} annotations: "helm.sh/hook": pre-install "helm.sh/hook-weight": "2" # Certificate 생성 후 실행되도록 우선순위 설정 @@ -11,7 +12,7 @@ spec: backoffLimit: 4 template: spec: - serviceAccountName: create-tls-ca-sa + serviceAccountName: {{ template "rancher.fullname" . }}-create-tls-ca-sa containers: - name: create-secret image: bitnami/kubectl:latest diff --git a/charts/rancher/templates/preinstallHook/role.yaml b/charts/rancher/templates/preinstallHook/role.yaml index 228ce7e..1cb04a8 100644 --- a/charts/rancher/templates/preinstallHook/role.yaml +++ b/charts/rancher/templates/preinstallHook/role.yaml @@ -2,7 +2,8 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - name: create-tls-ca-role + name: {{ template "rancher.fullname" . }}-create-tls-ca-role + labels: {{ include "rancher.labels" . | nindent 4 }} annotations: "helm.sh/hook": pre-install "helm.sh/hook-weight": "-2" diff --git a/charts/rancher/templates/preinstallHook/rolebinding.yaml b/charts/rancher/templates/preinstallHook/rolebinding.yaml index d090659..44ac314 100644 --- a/charts/rancher/templates/preinstallHook/rolebinding.yaml +++ b/charts/rancher/templates/preinstallHook/rolebinding.yaml @@ -2,16 +2,17 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: create-tls-ca-rolebinding + name: {{ template "rancher.fullname" . }}-create-tls-ca-rolebinding + labels: {{ include "rancher.labels" . | nindent 4 }} annotations: "helm.sh/hook": pre-install "helm.sh/hook-weight": "-1" "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed subjects: - kind: ServiceAccount - name: create-tls-ca-sa + name: {{ template "rancher.fullname" . }}-create-tls-ca-sa namespace: {{ .Release.Namespace }} roleRef: kind: Role - name: create-tls-ca-role + name: {{ template "rancher.fullname" . }}-create-tls-ca-role {{- end }} diff --git a/charts/rancher/templates/preinstallHook/serviceaccount.yaml b/charts/rancher/templates/preinstallHook/serviceaccount.yaml index 90ae811..c9df2b8 100644 --- a/charts/rancher/templates/preinstallHook/serviceaccount.yaml +++ b/charts/rancher/templates/preinstallHook/serviceaccount.yaml @@ -2,7 +2,8 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: create-tls-ca-sa + name: {{ template "rancher.fullname" . }}-create-tls-ca-sa + labels: {{ include "rancher.labels" . | nindent 4 }} annotations: "helm.sh/hook": pre-install "helm.sh/hook-weight": "-3"