From 7a85b930d756078d4521a7d034d66b34d2c08045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AE=B6=E5=90=8D?= <13774486042@163.com> Date: Tue, 6 Sep 2022 21:31:56 +0800 Subject: [PATCH] [k8s] Delete unnecessary configurations. (#11808) --- .../dolphinscheduler/templates/_helpers.tpl | 13 --------- .../configmap-dolphinscheduler-common.yaml | 2 +- .../deployment-dolphinscheduler-api.yaml | 1 - ...b-dolphinscheduler-schema-initializer.yaml | 1 - .../templates/secret-external-fs-s3a.yaml | 28 ------------------- .../statefulset-dolphinscheduler-master.yaml | 1 - .../statefulset-dolphinscheduler-worker.yaml | 1 - .../kubernetes/dolphinscheduler/values.yaml | 19 +------------ 8 files changed, 2 insertions(+), 64 deletions(-) delete mode 100644 deploy/kubernetes/dolphinscheduler/templates/secret-external-fs-s3a.yaml diff --git a/deploy/kubernetes/dolphinscheduler/templates/_helpers.tpl b/deploy/kubernetes/dolphinscheduler/templates/_helpers.tpl index 8507f4669c..20d9a464be 100644 --- a/deploy/kubernetes/dolphinscheduler/templates/_helpers.tpl +++ b/deploy/kubernetes/dolphinscheduler/templates/_helpers.tpl @@ -182,19 +182,6 @@ Create a registry environment variables. {{- end }} {{- end -}} -{{/* -Create a common fs_s3a environment variables. -*/}} -{{- define "dolphinscheduler.fs_s3a.env_vars" -}} -{{- if eq (default "HDFS" .Values.common.configmap.RESOURCE_STORAGE_TYPE) "S3" -}} -- name: FS_S3A_SECRET_KEY - valueFrom: - secretKeyRef: - key: fs-s3a-secret-key - name: {{ include "dolphinscheduler.fullname" . }}-fs-s3a -{{- end -}} -{{- end -}} - {{/* Create a sharedStoragePersistence volume. */}} diff --git a/deploy/kubernetes/dolphinscheduler/templates/configmap-dolphinscheduler-common.yaml b/deploy/kubernetes/dolphinscheduler/templates/configmap-dolphinscheduler-common.yaml index aa8042b0f1..19fac8d55d 100644 --- a/deploy/kubernetes/dolphinscheduler/templates/configmap-dolphinscheduler-common.yaml +++ b/deploy/kubernetes/dolphinscheduler/templates/configmap-dolphinscheduler-common.yaml @@ -23,7 +23,7 @@ metadata: app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-common {{- include "dolphinscheduler.common.labels" . | nindent 4 }} data: - {{- range $key, $value := (omit .Values.common.configmap "FS_S3A_SECRET_KEY") }} + {{- range $key, $value := .Values.common.configmap }} {{ $key }}: {{ $value | quote }} {{- end }} {{- end }} \ No newline at end of file diff --git a/deploy/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-api.yaml b/deploy/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-api.yaml index 789c8eaaf5..766620fcb3 100644 --- a/deploy/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-api.yaml +++ b/deploy/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-api.yaml @@ -71,7 +71,6 @@ spec: value: {{ .Values.timezone }} {{- include "dolphinscheduler.database.env_vars" . | nindent 12 }} {{- include "dolphinscheduler.registry.env_vars" . | nindent 12 }} - {{- include "dolphinscheduler.fs_s3a.env_vars" . | nindent 12 }} {{ range $key, $value := .Values.api.env }} - name: {{ $key }} value: {{ $value | quote }} diff --git a/deploy/kubernetes/dolphinscheduler/templates/job-dolphinscheduler-schema-initializer.yaml b/deploy/kubernetes/dolphinscheduler/templates/job-dolphinscheduler-schema-initializer.yaml index bb5780d670..204223b869 100644 --- a/deploy/kubernetes/dolphinscheduler/templates/job-dolphinscheduler-schema-initializer.yaml +++ b/deploy/kubernetes/dolphinscheduler/templates/job-dolphinscheduler-schema-initializer.yaml @@ -46,7 +46,6 @@ spec: value: {{ .Values.timezone }} {{- include "dolphinscheduler.database.env_vars" . | nindent 12 }} {{- include "dolphinscheduler.registry.env_vars" . | nindent 12 }} - {{- include "dolphinscheduler.fs_s3a.env_vars" . | nindent 12 }} envFrom: - configMapRef: name: {{ include "dolphinscheduler.fullname" . }}-common diff --git a/deploy/kubernetes/dolphinscheduler/templates/secret-external-fs-s3a.yaml b/deploy/kubernetes/dolphinscheduler/templates/secret-external-fs-s3a.yaml deleted file mode 100644 index 5ba2c50386..0000000000 --- a/deploy/kubernetes/dolphinscheduler/templates/secret-external-fs-s3a.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -{{- if eq (default "HDFS" .Values.common.configmap.RESOURCE_STORAGE_TYPE) "S3" }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "dolphinscheduler.fullname" . }}-fs-s3a - labels: - app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-fs-s3a - {{- include "dolphinscheduler.common.labels" . | nindent 4 }} -type: Opaque -data: - fs-s3a-secret-key: {{ .Values.common.configmap.FS_S3A_SECRET_KEY | b64enc | quote }} -{{- end }} \ No newline at end of file diff --git a/deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-master.yaml b/deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-master.yaml index 1dc6ee7afd..6610f3598d 100644 --- a/deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-master.yaml +++ b/deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-master.yaml @@ -66,7 +66,6 @@ spec: value: {{ .Values.timezone }} {{- include "dolphinscheduler.database.env_vars" . | nindent 12 }} {{- include "dolphinscheduler.registry.env_vars" . | nindent 12 }} - {{- include "dolphinscheduler.fs_s3a.env_vars" . | nindent 12 }} {{ range $key, $value := .Values.master.env }} - name: {{ $key }} value: {{ $value | quote }} diff --git a/deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml b/deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml index ce266d1eaf..349acfd860 100644 --- a/deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml +++ b/deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml @@ -68,7 +68,6 @@ spec: value: {{ include "dolphinscheduler.fullname" . }}-alert {{- include "dolphinscheduler.database.env_vars" . | nindent 12 }} {{- include "dolphinscheduler.registry.env_vars" . | nindent 12 }} - {{- include "dolphinscheduler.fs_s3a.env_vars" . | nindent 12 }} {{ range $key, $value := .Values.worker.env }} - name: {{ $key }} value: {{ $value | quote }} diff --git a/deploy/kubernetes/dolphinscheduler/values.yaml b/deploy/kubernetes/dolphinscheduler/values.yaml index 791bd65a4d..7fec3bef8e 100644 --- a/deploy/kubernetes/dolphinscheduler/values.yaml +++ b/deploy/kubernetes/dolphinscheduler/values.yaml @@ -149,25 +149,8 @@ common: configmap: DOLPHINSCHEDULER_OPTS: "" DATA_BASEDIR_PATH: "/tmp/dolphinscheduler" - RESOURCE_STORAGE_TYPE: "HDFS" RESOURCE_UPLOAD_PATH: "/dolphinscheduler" - FS_DEFAULT_FS: "file:///" - FS_S3A_ENDPOINT: "s3.xxx.amazonaws.com" - FS_S3A_ACCESS_KEY: "xxxxxxx" - FS_S3A_SECRET_KEY: "xxxxxxx" - HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE: "false" - JAVA_SECURITY_KRB5_CONF_PATH: "/opt/krb5.conf" - LOGIN_USER_KEYTAB_USERNAME: "hdfs@HADOOP.COM" - LOGIN_USER_KEYTAB_PATH: "/opt/hdfs.keytab" - KERBEROS_EXPIRE_TIME: "2" - HDFS_ROOT_USER: "hdfs" - RESOURCE_MANAGER_HTTPADDRESS_PORT: "8088" - YARN_RESOURCEMANAGER_HA_RM_IDS: "" - YARN_APPLICATION_STATUS_ADDRESS: "http://ds1:%s/ws/v1/cluster/apps/%s" - YARN_JOB_HISTORY_STATUS_ADDRESS: "http://ds1:19888/ws/v1/history/mapreduce/jobs/%s" - DATASOURCE_ENCRYPTION_ENABLE: "false" - DATASOURCE_ENCRYPTION_SALT: "!@#$%^&*" - SUDO_ENABLE: "true" + # dolphinscheduler env HADOOP_HOME: "/opt/soft/hadoop" HADOOP_CONF_DIR: "/opt/soft/hadoop/etc/hadoop"