From 84482a19f27a83eeeee9c3159dae398a96f1bdfe Mon Sep 17 00:00:00 2001 From: Cho Hyunwoo Date: Fri, 23 Aug 2024 01:28:46 +0900 Subject: [PATCH 1/7] install yorkie-cluster with yorkie-mongodb --- .gitignore | 2 +- build/charts/yorkie-cluster/Chart.lock | 6 ++++ build/charts/yorkie-cluster/Chart.yaml | 5 +++ build/charts/yorkie-cluster/README.md | 8 +++-- .../charts}/yorkie-mongodb/.helmignore | 0 .../charts/yorkie-mongodb/Chart.lock | 6 ++++ .../charts}/yorkie-mongodb/Chart.yaml | 2 +- .../charts}/yorkie-mongodb/README.md | 2 +- .../yorkie-mongodb/templates/NOTES.txt | 0 .../templates/sharded/_helpers.tpl | 0 .../templates/sharded/configmap.yaml | 0 .../yorkie-mongodb/templates/sharded/job.yaml | 0 .../templates/standalone/service.yaml | 0 .../templates/standalone/statefulset.yaml | 0 .../charts}/yorkie-mongodb/values.yaml | 1 + .../templates/yorkie/deployment.yaml | 34 +++++++++++++++++- .../yorkie-cluster/templates/yorkie/role.yaml | 35 +++++++++++++++++++ build/charts/yorkie-cluster/values.yaml | 9 +++++ build/charts/yorkie-mongodb/Chart.lock | 6 ---- 19 files changed, 104 insertions(+), 12 deletions(-) create mode 100644 build/charts/yorkie-cluster/Chart.lock rename build/charts/{ => yorkie-cluster/charts}/yorkie-mongodb/.helmignore (100%) create mode 100644 build/charts/yorkie-cluster/charts/yorkie-mongodb/Chart.lock rename build/charts/{ => yorkie-cluster/charts}/yorkie-mongodb/Chart.yaml (96%) rename build/charts/{ => yorkie-cluster/charts}/yorkie-mongodb/README.md (98%) rename build/charts/{ => yorkie-cluster/charts}/yorkie-mongodb/templates/NOTES.txt (100%) rename build/charts/{ => yorkie-cluster/charts}/yorkie-mongodb/templates/sharded/_helpers.tpl (100%) rename build/charts/{ => yorkie-cluster/charts}/yorkie-mongodb/templates/sharded/configmap.yaml (100%) rename build/charts/{ => yorkie-cluster/charts}/yorkie-mongodb/templates/sharded/job.yaml (100%) rename build/charts/{ => yorkie-cluster/charts}/yorkie-mongodb/templates/standalone/service.yaml (100%) rename build/charts/{ => yorkie-cluster/charts}/yorkie-mongodb/templates/standalone/statefulset.yaml (100%) rename build/charts/{ => yorkie-cluster/charts}/yorkie-mongodb/values.yaml (99%) create mode 100644 build/charts/yorkie-cluster/templates/yorkie/role.yaml delete mode 100644 build/charts/yorkie-mongodb/Chart.lock diff --git a/.gitignore b/.gitignore index 63fac3f1e..6c57eea31 100644 --- a/.gitignore +++ b/.gitignore @@ -71,4 +71,4 @@ output.txt **/charts/*.tgz /build/charts/yorkie-argocd/charts/ /build/charts/yorkie-monitoring/charts/ -/build/charts/yorkie-mongodb/charts/ +/build/charts/yorkie-cluster/charts/yorkie-mongodb/charts/ diff --git a/build/charts/yorkie-cluster/Chart.lock b/build/charts/yorkie-cluster/Chart.lock new file mode 100644 index 000000000..d4d5aabcf --- /dev/null +++ b/build/charts/yorkie-cluster/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: yorkie-mongodb + repository: "" + version: 0.4.13 +digest: sha256:0c702d4ee264c8cbc9a8959d0290c12679e013ccd7a979fcbf81a8c03519b220 +generated: "2024-08-29T01:24:48.119979+09:00" diff --git a/build/charts/yorkie-cluster/Chart.yaml b/build/charts/yorkie-cluster/Chart.yaml index 15ec0268c..6cbd5898e 100644 --- a/build/charts/yorkie-cluster/Chart.yaml +++ b/build/charts/yorkie-cluster/Chart.yaml @@ -15,6 +15,11 @@ version: 0.4.29 appVersion: "0.4.29" kubeVersion: ">=1.23.0-0" +dependencies: + - name: yorkie-mongodb + version: 0.4.13 + condition: yorkie-mongodb.sharded.enabled + keywords: - yorkie - cluster diff --git a/build/charts/yorkie-cluster/README.md b/build/charts/yorkie-cluster/README.md index 1ec2b262c..2361ae674 100644 --- a/build/charts/yorkie-cluster/README.md +++ b/build/charts/yorkie-cluster/README.md @@ -26,11 +26,15 @@ helm repo update _See [`helm repo`](https://helm.sh/docs/helm/helm_repo/) for command documentation._ -## Install Helm Chart +## Install Helm Chart ```bash +# Create mongodb namespace +kubectl create namespace yorkie + # Install yorkie cluster helm chart -helm install [RELEASE_NAME] yorkie-team/yorkie-cluster +helm install [RELEASE_NAME] yorkie-team/yorkie-cluster --set=yorkie-mongodb.sharded.enable +d=true ``` _See [configuration](#configuration) below for custom installation_ diff --git a/build/charts/yorkie-mongodb/.helmignore b/build/charts/yorkie-cluster/charts/yorkie-mongodb/.helmignore similarity index 100% rename from build/charts/yorkie-mongodb/.helmignore rename to build/charts/yorkie-cluster/charts/yorkie-mongodb/.helmignore diff --git a/build/charts/yorkie-cluster/charts/yorkie-mongodb/Chart.lock b/build/charts/yorkie-cluster/charts/yorkie-mongodb/Chart.lock new file mode 100644 index 000000000..a1a73372d --- /dev/null +++ b/build/charts/yorkie-cluster/charts/yorkie-mongodb/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: mongodb-sharded + repository: https://charts.bitnami.com/bitnami + version: 9.0.1 +digest: sha256:3e1cba1b156f3472d720e4f08341e0f58db702302f361d1f49738fd10d60e0ff +generated: "2024-10-09T17:27:23.654759+09:00" diff --git a/build/charts/yorkie-mongodb/Chart.yaml b/build/charts/yorkie-cluster/charts/yorkie-mongodb/Chart.yaml similarity index 96% rename from build/charts/yorkie-mongodb/Chart.yaml rename to build/charts/yorkie-cluster/charts/yorkie-mongodb/Chart.yaml index 44d510740..cf54f6c98 100644 --- a/build/charts/yorkie-mongodb/Chart.yaml +++ b/build/charts/yorkie-cluster/charts/yorkie-mongodb/Chart.yaml @@ -15,6 +15,6 @@ kubeVersion: ">=1.23.0-0" dependencies: - name: mongodb-sharded - version: "7.2.2" + version: "9.0.1" repository: "https://charts.bitnami.com/bitnami" condition: sharded.enabled diff --git a/build/charts/yorkie-mongodb/README.md b/build/charts/yorkie-cluster/charts/yorkie-mongodb/README.md similarity index 98% rename from build/charts/yorkie-mongodb/README.md rename to build/charts/yorkie-cluster/charts/yorkie-mongodb/README.md index eed6956fb..19cdb6bc4 100644 --- a/build/charts/yorkie-mongodb/README.md +++ b/build/charts/yorkie-cluster/charts/yorkie-mongodb/README.md @@ -22,7 +22,7 @@ _See [`helm repo`](https://helm.sh/docs/helm/helm_repo/) for command documentati # Create mongodb namespace kubectl create namespace mongodb -# Install yorkie monitoring helm chart +# Install yorkie mongodb helm chart helm install [RELEASE_NAME] yorkie-team/yorkie-mongodb --namespace mongodb --set=sharded.enabled=true ``` diff --git a/build/charts/yorkie-mongodb/templates/NOTES.txt b/build/charts/yorkie-cluster/charts/yorkie-mongodb/templates/NOTES.txt similarity index 100% rename from build/charts/yorkie-mongodb/templates/NOTES.txt rename to build/charts/yorkie-cluster/charts/yorkie-mongodb/templates/NOTES.txt diff --git a/build/charts/yorkie-mongodb/templates/sharded/_helpers.tpl b/build/charts/yorkie-cluster/charts/yorkie-mongodb/templates/sharded/_helpers.tpl similarity index 100% rename from build/charts/yorkie-mongodb/templates/sharded/_helpers.tpl rename to build/charts/yorkie-cluster/charts/yorkie-mongodb/templates/sharded/_helpers.tpl diff --git a/build/charts/yorkie-mongodb/templates/sharded/configmap.yaml b/build/charts/yorkie-cluster/charts/yorkie-mongodb/templates/sharded/configmap.yaml similarity index 100% rename from build/charts/yorkie-mongodb/templates/sharded/configmap.yaml rename to build/charts/yorkie-cluster/charts/yorkie-mongodb/templates/sharded/configmap.yaml diff --git a/build/charts/yorkie-mongodb/templates/sharded/job.yaml b/build/charts/yorkie-cluster/charts/yorkie-mongodb/templates/sharded/job.yaml similarity index 100% rename from build/charts/yorkie-mongodb/templates/sharded/job.yaml rename to build/charts/yorkie-cluster/charts/yorkie-mongodb/templates/sharded/job.yaml diff --git a/build/charts/yorkie-mongodb/templates/standalone/service.yaml b/build/charts/yorkie-cluster/charts/yorkie-mongodb/templates/standalone/service.yaml similarity index 100% rename from build/charts/yorkie-mongodb/templates/standalone/service.yaml rename to build/charts/yorkie-cluster/charts/yorkie-mongodb/templates/standalone/service.yaml diff --git a/build/charts/yorkie-mongodb/templates/standalone/statefulset.yaml b/build/charts/yorkie-cluster/charts/yorkie-mongodb/templates/standalone/statefulset.yaml similarity index 100% rename from build/charts/yorkie-mongodb/templates/standalone/statefulset.yaml rename to build/charts/yorkie-cluster/charts/yorkie-mongodb/templates/standalone/statefulset.yaml diff --git a/build/charts/yorkie-mongodb/values.yaml b/build/charts/yorkie-cluster/charts/yorkie-mongodb/values.yaml similarity index 99% rename from build/charts/yorkie-mongodb/values.yaml rename to build/charts/yorkie-cluster/charts/yorkie-mongodb/values.yaml index 364ca8ce8..8a127e542 100644 --- a/build/charts/yorkie-mongodb/values.yaml +++ b/build/charts/yorkie-cluster/charts/yorkie-mongodb/values.yaml @@ -173,6 +173,7 @@ mongodb-sharded: # Configuration for mongos mongos: + namespaceOverride: mongodb replicaCount: *mongosReplicaCount command: - mongos diff --git a/build/charts/yorkie-cluster/templates/yorkie/deployment.yaml b/build/charts/yorkie-cluster/templates/yorkie/deployment.yaml index a07c01a10..1cdac34f1 100644 --- a/build/charts/yorkie-cluster/templates/yorkie/deployment.yaml +++ b/build/charts/yorkie-cluster/templates/yorkie/deployment.yaml @@ -32,6 +32,38 @@ spec: prometheus.io/port: "{{ .Values.yorkie.ports.profilingPort }}" prometheus.io/path: "/metrics" spec: + {{ if index .Values "yorkie-mongodb" "sharded" "enabled"}} + initContainers: + - name: wait-db + image: bitnami/kubectl:latest + command: + - /bin/sh + - -c + - | + echo "Wait db start" + while true; do + job_status=$(kubectl get job -n $NAMESPACE $JOB_NAME -o jsonpath='{.status.conditions[?(@.type=="Complete")].status}') + if [ "$job_status" = "True" ]; then + echo "Job completed" + break + fi + echo "Waiting for job to complete..." + sleep 5 + done + env: + - name: NAMESPACE + value: "{{ index .Values "yorkie-mongodb" "namespace" }}" + - name: JOB_NAME + value: "{{ index .Values "yorkie-mongodb" "name" }}-setup-job" + volumeMounts: + - name: kubeconfig + mountPath: /root/.kube + subPath: config + volumes: + - name: kubeconfig + emptyDir: { } + serviceAccountName: yorkie-db-service-account + {{ end }} containers: - name: yorkie image: "{{ .Values.yorkie.image.repository }}:{{ .Values.yorkie.image.tag | default .Chart.AppVersion }}" @@ -54,4 +86,4 @@ spec: port: {{ .Values.yorkie.ports.rpcPort }} initialDelaySeconds: 10 resources: - {{ toYaml .Values.yorkie.resources | nindent 12 }} + {{ toYaml .Values.yorkie.resources | nindent 12 }} \ No newline at end of file diff --git a/build/charts/yorkie-cluster/templates/yorkie/role.yaml b/build/charts/yorkie-cluster/templates/yorkie/role.yaml new file mode 100644 index 000000000..6d96db295 --- /dev/null +++ b/build/charts/yorkie-cluster/templates/yorkie/role.yaml @@ -0,0 +1,35 @@ +{{- if index .Values "yorkie-mongodb" "sharded" "enabled"}} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + namespace: {{ index .Values "yorkie-mongodb" "namespace" }} + name: db-status-reader +rules: + - apiGroups: ["batch"] + resources: ["jobs"] + verbs: ["get", "list"] + +--- + +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: read-db-status + namespace: {{ index .Values "yorkie-mongodb" "namespace" }} +subjects: + - kind: ServiceAccount + name: yorkie-db-service-account + namespace: {{ .Values.yorkie.namespace }} +roleRef: + kind: Role + name: db-status-reader + apiGroup: rbac.authorization.k8s.io + +--- + +apiVersion: v1 +kind: ServiceAccount +metadata: + name: yorkie-db-service-account + namespace: {{ .Values.yorkie.namespace }} +{{ end -}} \ No newline at end of file diff --git a/build/charts/yorkie-cluster/values.yaml b/build/charts/yorkie-cluster/values.yaml index 204e58d18..9d23c44b7 100644 --- a/build/charts/yorkie-cluster/values.yaml +++ b/build/charts/yorkie-cluster/values.yaml @@ -70,3 +70,12 @@ ratelimit: unit: minute requestsPerUnit: 10000 domain: yorkie-ratelimit + +# Configuration for yorkie-mongodb +yorkie-mongodb: + name: mongodb + namespace: mongodb + port: 27017 + clusterDomain: cluster.local + sharded: + enabled: false \ No newline at end of file diff --git a/build/charts/yorkie-mongodb/Chart.lock b/build/charts/yorkie-mongodb/Chart.lock deleted file mode 100644 index 397448d5d..000000000 --- a/build/charts/yorkie-mongodb/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: mongodb-sharded - repository: https://charts.bitnami.com/bitnami - version: 7.2.2 -digest: sha256:ae306fa705473ca5e99f02fcca27ebb5900cf4bdf4357472f8b5006c9c4fca24 -generated: "2024-01-23T20:44:36.400805+09:00" From 208fa913038265f1f1aa1f1a21617febc1c985fd Mon Sep 17 00:00:00 2001 From: Cho Hyunwoo Date: Wed, 9 Oct 2024 18:51:00 +0900 Subject: [PATCH 2/7] correct the typo --- build/charts/yorkie-cluster/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/charts/yorkie-cluster/README.md b/build/charts/yorkie-cluster/README.md index 2361ae674..29e1d58b7 100644 --- a/build/charts/yorkie-cluster/README.md +++ b/build/charts/yorkie-cluster/README.md @@ -33,8 +33,7 @@ _See [`helm repo`](https://helm.sh/docs/helm/helm_repo/) for command documentati kubectl create namespace yorkie # Install yorkie cluster helm chart -helm install [RELEASE_NAME] yorkie-team/yorkie-cluster --set=yorkie-mongodb.sharded.enable -d=true +helm install [RELEASE_NAME] yorkie-team/yorkie-cluster --set=yorkie-mongodb.sharded.enabled=true ``` _See [configuration](#configuration) below for custom installation_ From 3b47fbaac9e2657fa761551e8f0d9c06ea2e3335 Mon Sep 17 00:00:00 2001 From: Cho Hyunwoo Date: Sat, 19 Oct 2024 16:03:06 +0900 Subject: [PATCH 3/7] Improve yorkie-mongodb with yorkie-cluster - refactor typo and wording - set sharded=true to default option - remove yorkie-mongodb dependency condition for standalone mode --- build/charts/yorkie-cluster/Chart.lock | 2 +- build/charts/yorkie-cluster/Chart.yaml | 1 - build/charts/yorkie-cluster/README.md | 7 +++++-- .../yorkie-cluster/templates/yorkie/deployment.yaml | 8 ++++---- build/charts/yorkie-cluster/templates/yorkie/role.yaml | 6 +++--- build/charts/yorkie-cluster/values.yaml | 10 +++++++++- 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/build/charts/yorkie-cluster/Chart.lock b/build/charts/yorkie-cluster/Chart.lock index d4d5aabcf..8e934b1c3 100644 --- a/build/charts/yorkie-cluster/Chart.lock +++ b/build/charts/yorkie-cluster/Chart.lock @@ -3,4 +3,4 @@ dependencies: repository: "" version: 0.4.13 digest: sha256:0c702d4ee264c8cbc9a8959d0290c12679e013ccd7a979fcbf81a8c03519b220 -generated: "2024-08-29T01:24:48.119979+09:00" +generated: "2024-10-19T15:27:57.253314+09:00" diff --git a/build/charts/yorkie-cluster/Chart.yaml b/build/charts/yorkie-cluster/Chart.yaml index 6cbd5898e..134dd9a3e 100644 --- a/build/charts/yorkie-cluster/Chart.yaml +++ b/build/charts/yorkie-cluster/Chart.yaml @@ -18,7 +18,6 @@ kubeVersion: ">=1.23.0-0" dependencies: - name: yorkie-mongodb version: 0.4.13 - condition: yorkie-mongodb.sharded.enabled keywords: - yorkie diff --git a/build/charts/yorkie-cluster/README.md b/build/charts/yorkie-cluster/README.md index 29e1d58b7..9b13c04dd 100644 --- a/build/charts/yorkie-cluster/README.md +++ b/build/charts/yorkie-cluster/README.md @@ -30,10 +30,13 @@ _See [`helm repo`](https://helm.sh/docs/helm/helm_repo/) for command documentati ```bash # Create mongodb namespace -kubectl create namespace yorkie +kubectl create namespace mongodb # Install yorkie cluster helm chart -helm install [RELEASE_NAME] yorkie-team/yorkie-cluster --set=yorkie-mongodb.sharded.enabled=true +helm install [RELEASE_NAME] yorkie-team/yorkie-cluster + +# Install yorkie cluster helm chart with standalone parameter (disable sharding) +helm install [RELEASE_NAME] yorkie-team/yorkie-cluster --set=yorkie-mongodb.sharded.enabled=false ``` _See [configuration](#configuration) below for custom installation_ diff --git a/build/charts/yorkie-cluster/templates/yorkie/deployment.yaml b/build/charts/yorkie-cluster/templates/yorkie/deployment.yaml index 1cdac34f1..2a6907569 100644 --- a/build/charts/yorkie-cluster/templates/yorkie/deployment.yaml +++ b/build/charts/yorkie-cluster/templates/yorkie/deployment.yaml @@ -34,7 +34,7 @@ spec: spec: {{ if index .Values "yorkie-mongodb" "sharded" "enabled"}} initContainers: - - name: wait-db + - name: wait-for-sharded-db-provision image: bitnami/kubectl:latest command: - /bin/sh @@ -44,10 +44,10 @@ spec: while true; do job_status=$(kubectl get job -n $NAMESPACE $JOB_NAME -o jsonpath='{.status.conditions[?(@.type=="Complete")].status}') if [ "$job_status" = "True" ]; then - echo "Job completed" + echo "DB provisioning Job completed successfully!" break fi - echo "Waiting for job to complete..." + echo "Waiting for DB provisioning job to complete..." sleep 5 done env: @@ -86,4 +86,4 @@ spec: port: {{ .Values.yorkie.ports.rpcPort }} initialDelaySeconds: 10 resources: - {{ toYaml .Values.yorkie.resources | nindent 12 }} \ No newline at end of file + {{ toYaml .Values.yorkie.resources | nindent 12 }} diff --git a/build/charts/yorkie-cluster/templates/yorkie/role.yaml b/build/charts/yorkie-cluster/templates/yorkie/role.yaml index 6d96db295..df5278dc8 100644 --- a/build/charts/yorkie-cluster/templates/yorkie/role.yaml +++ b/build/charts/yorkie-cluster/templates/yorkie/role.yaml @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: namespace: {{ index .Values "yorkie-mongodb" "namespace" }} - name: db-status-reader + name: db-provisioning-job-status-reader rules: - apiGroups: ["batch"] resources: ["jobs"] @@ -22,7 +22,7 @@ subjects: namespace: {{ .Values.yorkie.namespace }} roleRef: kind: Role - name: db-status-reader + name: db-provisioning-job-status-reader apiGroup: rbac.authorization.k8s.io --- @@ -32,4 +32,4 @@ kind: ServiceAccount metadata: name: yorkie-db-service-account namespace: {{ .Values.yorkie.namespace }} -{{ end -}} \ No newline at end of file +{{ end -}} diff --git a/build/charts/yorkie-cluster/values.yaml b/build/charts/yorkie-cluster/values.yaml index 9d23c44b7..8aab5c3a0 100644 --- a/build/charts/yorkie-cluster/values.yaml +++ b/build/charts/yorkie-cluster/values.yaml @@ -77,5 +77,13 @@ yorkie-mongodb: namespace: mongodb port: 27017 clusterDomain: cluster.local + image: + registry: docker.io + repository: mongo + tag: "6.0" + persistence: + dataSize: 1Gi + configSize: 500Mi + storageClass: standard sharded: - enabled: false \ No newline at end of file + enabled: true From 702ad0079e723ab11d7be4353e3ecd2bfcc2ed42 Mon Sep 17 00:00:00 2001 From: Cho Hyunwoo Date: Sat, 19 Oct 2024 16:39:07 +0900 Subject: [PATCH 4/7] delete clusterdomain value option --- build/charts/yorkie-cluster/values.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/build/charts/yorkie-cluster/values.yaml b/build/charts/yorkie-cluster/values.yaml index 8aab5c3a0..8b982ddb4 100644 --- a/build/charts/yorkie-cluster/values.yaml +++ b/build/charts/yorkie-cluster/values.yaml @@ -76,7 +76,6 @@ yorkie-mongodb: name: mongodb namespace: mongodb port: 27017 - clusterDomain: cluster.local image: registry: docker.io repository: mongo From 125b896df2a6aeaf5ef49a7efa6f01e8df9b9fe3 Mon Sep 17 00:00:00 2001 From: Cho Hyunwoo Date: Sat, 19 Oct 2024 16:47:12 +0900 Subject: [PATCH 5/7] refactor rolebinding name --- build/charts/yorkie-cluster/templates/yorkie/role.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/charts/yorkie-cluster/templates/yorkie/role.yaml b/build/charts/yorkie-cluster/templates/yorkie/role.yaml index df5278dc8..a4e285466 100644 --- a/build/charts/yorkie-cluster/templates/yorkie/role.yaml +++ b/build/charts/yorkie-cluster/templates/yorkie/role.yaml @@ -14,7 +14,7 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: read-db-status + name: read-db-provisioning-status namespace: {{ index .Values "yorkie-mongodb" "namespace" }} subjects: - kind: ServiceAccount From 43f1a229532884e61e10528fc97842e0769e13b0 Mon Sep 17 00:00:00 2001 From: Cho Hyunwoo Date: Sat, 19 Oct 2024 16:51:44 +0900 Subject: [PATCH 6/7] refactor service account name --- build/charts/yorkie-cluster/templates/yorkie/role.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/charts/yorkie-cluster/templates/yorkie/role.yaml b/build/charts/yorkie-cluster/templates/yorkie/role.yaml index a4e285466..eefa24d6f 100644 --- a/build/charts/yorkie-cluster/templates/yorkie/role.yaml +++ b/build/charts/yorkie-cluster/templates/yorkie/role.yaml @@ -18,7 +18,7 @@ metadata: namespace: {{ index .Values "yorkie-mongodb" "namespace" }} subjects: - kind: ServiceAccount - name: yorkie-db-service-account + name: yorkie-db-provisioning-job-account namespace: {{ .Values.yorkie.namespace }} roleRef: kind: Role @@ -30,6 +30,6 @@ roleRef: apiVersion: v1 kind: ServiceAccount metadata: - name: yorkie-db-service-account + name: yorkie-db-provisioning-job-account namespace: {{ .Values.yorkie.namespace }} {{ end -}} From 37ef8e48633c5e6a35c96da06da167757807b16f Mon Sep 17 00:00:00 2001 From: Cho Hyunwoo Date: Sat, 19 Oct 2024 16:53:08 +0900 Subject: [PATCH 7/7] fix service account name --- build/charts/yorkie-cluster/templates/yorkie/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/charts/yorkie-cluster/templates/yorkie/deployment.yaml b/build/charts/yorkie-cluster/templates/yorkie/deployment.yaml index 2a6907569..bd5a39a56 100644 --- a/build/charts/yorkie-cluster/templates/yorkie/deployment.yaml +++ b/build/charts/yorkie-cluster/templates/yorkie/deployment.yaml @@ -62,7 +62,7 @@ spec: volumes: - name: kubeconfig emptyDir: { } - serviceAccountName: yorkie-db-service-account + serviceAccountName: yorkie-db-provisioning-job-account {{ end }} containers: - name: yorkie