From a57c2a15df9393c5833c48ca88478ad5b8e8dfde Mon Sep 17 00:00:00 2001 From: AlinsRan Date: Fri, 6 Oct 2023 16:05:29 +0800 Subject: [PATCH] remove conf server --- charts/apisix/README.md | 15 -------- charts/apisix/templates/_pod.tpl | 32 ---------------- charts/apisix/templates/configmap.yaml | 27 +------------ .../templates/service-control-plane.yaml | 38 ------------------- charts/apisix/values.yaml | 35 ----------------- 5 files changed, 1 insertion(+), 146 deletions(-) delete mode 100644 charts/apisix/templates/service-control-plane.yaml diff --git a/charts/apisix/README.md b/charts/apisix/README.md index fc951f34..9f90d54b 100644 --- a/charts/apisix/README.md +++ b/charts/apisix/README.md @@ -120,21 +120,6 @@ The command removes all the Kubernetes components associated with the chart and | dashboard.config.conf.etcd.prefix | string | `"/apisix"` | apisix configurations prefix | | dashboard.config.conf.etcd.username | string | `nil` | Specifies etcd basic auth username if enable etcd auth | | dashboard.enabled | bool | `false` | | -| deployment.certs | object | `{"cert":"","cert_key":"","certsSecret":"","mTLSCACert":"","mTLSCACertSecret":""}` | certs used for certificates in decoupled mode | -| deployment.certs.cert | string | `""` | cert name in certsSecret | -| deployment.certs.cert_key | string | `""` | cert key in certsSecret | -| deployment.certs.certsSecret | string | `""` | secret name used for decoupled mode | -| deployment.certs.mTLSCACert | string | `""` | mTLS CA cert filename in mTLSCACertSecret | -| deployment.certs.mTLSCACertSecret | string | `""` | trusted_ca_cert name in certsSecret | -| deployment.controlPlane | object | `{"cert":"","certKey":"","certsSecret":"","confServerPort":"9280"}` | used for control_plane deployment mode | -| deployment.controlPlane.cert | string | `""` | conf Server CA cert name in certsSecret | -| deployment.controlPlane.certKey | string | `""` | conf Server cert key name in certsSecret | -| deployment.controlPlane.certsSecret | string | `""` | secret name used by conf Server | -| deployment.controlPlane.confServerPort | string | `"9280"` | conf Server address | -| deployment.dataPlane | object | `{"controlPlane":{"host":[],"prefix":"/apisix","timeout":30}}` | used for data_plane deployment mode | -| deployment.dataPlane.controlPlane.host | list | `[]` | The hosts of the control_plane used by the data_plane | -| deployment.dataPlane.controlPlane.prefix | string | `"/apisix"` | The prefix of the control_plane used by the data_plane | -| deployment.dataPlane.controlPlane.timeout | int | `30` | Timeout when the data plane connects to the control plane | | deployment.mode | string | `"traditional"` | Apache APISIX deployment mode Optional: traditional, decoupled ref: https://apisix.apache.org/docs/apisix/deployment-modes/ | | deployment.role | string | `"traditional"` | Deployment role Optional: traditional, data_plane, control_plane ref: https://apisix.apache.org/docs/apisix/deployment-modes/ | | discovery.enabled | bool | `false` | Enable or disable Apache APISIX integration service discovery | diff --git a/charts/apisix/templates/_pod.tpl b/charts/apisix/templates/_pod.tpl index 38738c11..56773494 100644 --- a/charts/apisix/templates/_pod.tpl +++ b/charts/apisix/templates/_pod.tpl @@ -147,21 +147,6 @@ spec: subPath: {{ .Values.gateway.tls.certCAFilename }} {{- end }} - {{- if and (eq .Values.deployment.role "control_plane") .Values.deployment.controlPlane.certsSecret }} - - mountPath: /conf-server-ssl - name: conf-server-ssl - {{- end }} - - {{- if and (eq .Values.deployment.mode "decoupled") .Values.deployment.certs.mTLSCACertSecret }} - - mountPath: /conf-ca-ssl - name: conf-ca-ssl - {{- end }} - - {{- if and (eq .Values.deployment.mode "decoupled") .Values.deployment.certs.certsSecret }} - - mountPath: /conf-client-ssl - name: conf-client-ssl - {{- end }} - {{- if .Values.etcd.auth.tls.enabled }} - mountPath: /etcd-ssl name: etcd-ssl @@ -226,23 +211,6 @@ spec: secretName: {{ .Values.etcd.auth.tls.existingSecret | quote }} name: etcd-ssl {{- end }} - {{- if and (eq .Values.deployment.role "control_plane") .Values.deployment.controlPlane.certsSecret }} - - secret: - secretName: {{ .Values.deployment.controlPlane.certsSecret | quote }} - name: conf-server-ssl - {{- end }} - - {{- if and (eq .Values.deployment.mode "decoupled") .Values.deployment.certs.mTLSCACertSecret }} - - secret: - secretName: {{ .Values.deployment.certs.mTLSCACertSecret | quote }} - name: conf-ca-ssl - {{- end }} - - {{- if and (eq .Values.deployment.mode "decoupled") .Values.deployment.certs.certsSecret }} - - secret: - secretName: {{ .Values.deployment.certs.certsSecret | quote }} - name: conf-client-ssl - {{- end }} {{- if .Values.apisix.setIDFromPodUID }} - downwardAPI: items: diff --git a/charts/apisix/templates/configmap.yaml b/charts/apisix/templates/configmap.yaml index 87f10647..5f8843ed 100644 --- a/charts/apisix/templates/configmap.yaml +++ b/charts/apisix/templates/configmap.yaml @@ -306,13 +306,6 @@ data: {{- if eq .Values.deployment.role "control_plane" }} role_control_plane: config_provider: etcd - conf_server: - listen: 0.0.0.0:{{ .Values.deployment.controlPlane.confServerPort }} - cert: "/conf-server-ssl/{{ .Values.deployment.controlPlane.cert }}" - cert_key: "/conf-server-ssl/{{ .Values.deployment.controlPlane.certKey }}" - {{- if .Values.deployment.certs.mTLSCACertSecret }} - client_ca_cert: "/conf-ca-ssl/{{ .Values.deployment.certs.mTLSCACert }}" - {{- end }} {{- end }} admin: @@ -386,25 +379,7 @@ data: {{- if eq .Values.deployment.role "data_plane" }} role_data_plane: - config_provider: control_plane - control_plane: - host: - {{- range $.Values.deployment.dataPlane.controlPlane.host }} - - {{ . | quote }} - {{- end }} - prefix: {{ .Values.deployment.dataPlane.controlPlane.prefix }} - timeout: {{ .Values.deployment.dataPlane.controlPlane.timeout }} - {{- end }} - - {{- if eq .Values.deployment.mode "decoupled"}} - {{- if .Values.deployment.certs.certsSecret }} - certs: - cert: "/conf-client-ssl/{{ .Values.deployment.certs.cert }}" - cert_key: "/conf-client-ssl/{{ .Values.deployment.certs.cert_key }}" - {{- if .Values.deployment.certs.mTLSCACertSecret }} - trusted_ca_cert: "/conf-ca-ssl/{{ .Values.deployment.certs.mTLSCACert }}" - {{- end }} - {{- end }} + config_provider: etcd {{- end }} {{- end }} diff --git a/charts/apisix/templates/service-control-plane.yaml b/charts/apisix/templates/service-control-plane.yaml deleted file mode 100644 index a5326412..00000000 --- a/charts/apisix/templates/service-control-plane.yaml +++ /dev/null @@ -1,38 +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 and (eq .Values.deployment.mode "decoupled") (eq .Values.deployment.role "control_plane") }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "apisix.fullname" . }}-control-plane - namespace: {{ .Release.Namespace }} - annotations: - {{- range $key, $value := .Values.admin.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - labels: - {{- include "apisix.labels" . | nindent 4 }} - app.kubernetes.io/service: apisix-control-plane -spec: - type: "ClusterIP" - ports: - - name: apisix-control-plane - port: {{ .Values.deployment.controlPlane.confServerPort }} - targetPort: {{ .Values.deployment.controlPlane.confServerPort }} - protocol: TCP - selector: - {{- include "apisix.selectorLabels" . | nindent 4 }} -{{ end }} diff --git a/charts/apisix/values.yaml b/charts/apisix/values.yaml index 73b07222..ee22bb7a 100644 --- a/charts/apisix/values.yaml +++ b/charts/apisix/values.yaml @@ -218,41 +218,6 @@ deployment: # ref: https://apisix.apache.org/docs/apisix/deployment-modes/ role: "traditional" - # -- used for control_plane deployment mode - controlPlane: - # -- conf Server address - confServerPort: "9280" - # -- secret name used by conf Server - certsSecret: "" - # -- conf Server CA cert name in certsSecret - cert: "" - # -- conf Server cert key name in certsSecret - certKey: "" - - # -- used for data_plane deployment mode - dataPlane: - controlPlane: - # -- The hosts of the control_plane used by the data_plane - host: [] - # -- The prefix of the control_plane used by the data_plane - prefix: "/apisix" - # -- Timeout when the data plane connects to the control plane - timeout: 30 - - # -- certs used for certificates in decoupled mode - certs: - # -- secret name used for decoupled mode - certsSecret: "" - # -- cert name in certsSecret - cert: "" - # -- cert key in certsSecret - cert_key: "" - - # -- trusted_ca_cert name in certsSecret - mTLSCACertSecret: "" - # -- mTLS CA cert filename in mTLSCACertSecret - mTLSCACert: "" - gateway: # -- Apache APISIX service type for user access itself type: NodePort