From fac4c5914876d7f712babad38fab26e0401ce5d8 Mon Sep 17 00:00:00 2001 From: Alex Lee <8878798+alee-x@users.noreply.github.com> Date: Tue, 16 Apr 2024 13:37:17 +0100 Subject: [PATCH] fix: typo in container Dockerfile, correct statefulset for pg backend (#59) --- charts/hive/templates/deployment.yaml | 2 +- charts/hive/templates/statefulset.yaml | 20 +++++++++++++++----- charts/hive/values.yaml | 4 ++-- containers/hive/Dockerfile | 2 +- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/charts/hive/templates/deployment.yaml b/charts/hive/templates/deployment.yaml index 001d284..c48a370 100644 --- a/charts/hive/templates/deployment.yaml +++ b/charts/hive/templates/deployment.yaml @@ -55,7 +55,7 @@ spec: value: "postgres" {{- end }} - name: METASTORE_DB_PORT - value: {{ .Values.metastoreDb.port }} + value: "{{ .Values.metastoreDb.port }}" {{- with .Values.env }} {{- . | toYaml | nindent 12 }} {{- end }} diff --git a/charts/hive/templates/statefulset.yaml b/charts/hive/templates/statefulset.yaml index c1b5e44..fa4878a 100644 --- a/charts/hive/templates/statefulset.yaml +++ b/charts/hive/templates/statefulset.yaml @@ -38,12 +38,22 @@ spec: image: "{{.Values.image.repository}}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: + {{- if .Values.mysql.enabled }} - name: METASTORE_DB_HOSTNAME - {{- if index .Values "postgresql-ha.overrideAddress" }} - value: {{ index .Values "postgresql-ha.overrideAddress" }} - {{- else }} - value: {{ .Release.Name }}-postgresql-ha-pgpool - {{- end }} + value: {{ .Release.Name }}-{{ .Values.metastoreDb.hostname }} + - name: METASTORE_DB_TYPE + value: "mysql" + {{- else }} + - name: METASTORE_DB_HOSTNAME + value: {{ .Values.metastoreDb.hostname }} + - name: METASTORE_DB_TYPE + value: "postgres" + {{- end }} + - name: METASTORE_DB_PORT + value: "{{ .Values.metastoreDb.port }}" + {{- with .Values.env }} + {{- . | toYaml | nindent 12 }} + {{- end }} ports: - name: tcp containerPort: 9083 diff --git a/charts/hive/values.yaml b/charts/hive/values.yaml index 5792f7b..cad7087 100644 --- a/charts/hive/values.yaml +++ b/charts/hive/values.yaml @@ -61,12 +61,12 @@ mysql: enabled: true architecture: replication auth: - rootPassword: 'P4ssW0rd!1' + # rootPassword: 'P4ssW0rd!1' createDatabase: true database: metastore_db username: hive password: 'H1v3P4ssW0rd!1' - replicationPassword: 'R3pl1c4t1onP4ssW0rd!1' + # replicationPassword: 'R3pl1c4t1onP4ssW0rd!1' secondary: replicaCount: 2 diff --git a/containers/hive/Dockerfile b/containers/hive/Dockerfile index df387a0..e01104b 100644 --- a/containers/hive/Dockerfile +++ b/containers/hive/Dockerfile @@ -34,4 +34,4 @@ RUN addgroup --system hive --gid=1000 && \ USER hive EXPOSE 9083 -ENTRYPOINT ["sh", "-c", "/entrypoint.sh"] +ENTRYPOINT ["sh", "-c", "/entrypoint.sh"] \ No newline at end of file