Skip to content

Commit cc3af78

Browse files
authored
chore: remove deployment mode and role from gateway chart (#185)
Signed-off-by: Nic <[email protected]>
1 parent 68be44b commit cc3af78

File tree

6 files changed

+3
-151
lines changed

6 files changed

+3
-151
lines changed

charts/gateway/README.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,6 @@ The command removes all the Kubernetes components associated with the chart and
138138
| deployment.certs.certsSecret | string | `""` | secret name used for decoupled mode |
139139
| deployment.certs.mTLSCACert | string | `""` | mTLS CA cert filename in mTLSCACertSecret |
140140
| deployment.certs.mTLSCACertSecret | string | `""` | trusted_ca_cert name in certsSecret |
141-
| deployment.controlPlane | object | `{"cert":"","certKey":"","certsSecret":"","confServerPort":"9280"}` | used for control_plane deployment mode |
142-
| deployment.controlPlane.cert | string | `""` | conf Server CA cert name in certsSecret |
143-
| deployment.controlPlane.certKey | string | `""` | conf Server cert key name in certsSecret |
144-
| deployment.controlPlane.certsSecret | string | `""` | secret name used by conf Server |
145-
| deployment.controlPlane.confServerPort | string | `"9280"` | conf Server address |
146-
| deployment.dataPlane | object | `{"controlPlane":{"host":[],"prefix":"/apisix","timeout":30}}` | used for data_plane deployment mode |
147-
| deployment.dataPlane.controlPlane.host | list | `[]` | The hosts of the control_plane used by the data_plane |
148-
| deployment.dataPlane.controlPlane.prefix | string | `"/apisix"` | The prefix of the control_plane used by the data_plane |
149-
| deployment.dataPlane.controlPlane.timeout | int | `30` | Timeout when the data plane connects to the control plane |
150-
| deployment.mode | string | `"traditional"` | API7 Gateway deployment mode Optional: traditional, decoupled ref: https://apisix.apache.org/docs/apisix/deployment-modes/ |
151-
| deployment.role | string | `"traditional"` | Deployment role Optional: traditional, data_plane, control_plane ref: https://apisix.apache.org/docs/apisix/deployment-modes/ |
152141
| discovery.enabled | bool | `false` | Enable or disable API7 Gateway integration service discovery |
153142
| discovery.registry | object | `{}` | Registry is the same to the one in APISIX [config-default.yaml](https://github.com/apache/apisix/blob/master/conf/config-default.yaml#L281), and refer to such file for more setting details. also refer to [this documentation for integration service discovery](https://apisix.apache.org/docs/apisix/discovery) |
154143
| dns.resolvers[0] | string | `"127.0.0.1"` | |

charts/gateway/templates/_pod.tpl

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ spec:
117117
{{- end }}
118118
{{- end }}
119119
{{- end }}
120-
121-
{{- if ne .Values.deployment.role "control_plane" }}
122120
readinessProbe:
123121
failureThreshold: 6
124122
initialDelaySeconds: 10
@@ -127,7 +125,6 @@ spec:
127125
tcpSocket:
128126
port: {{ .Values.gateway.http.containerPort }}
129127
timeoutSeconds: 1
130-
{{- end }}
131128
lifecycle:
132129
preStop:
133130
exec:
@@ -150,21 +147,6 @@ spec:
150147
subPath: {{ .Values.gateway.tls.certCAFilename }}
151148
{{- end }}
152149

153-
{{- if and (eq .Values.deployment.role "control_plane") .Values.deployment.controlPlane.certsSecret }}
154-
- mountPath: /conf-server-ssl
155-
name: conf-server-ssl
156-
{{- end }}
157-
158-
{{- if and (eq .Values.deployment.mode "decoupled") .Values.deployment.certs.mTLSCACertSecret }}
159-
- mountPath: /conf-ca-ssl
160-
name: conf-ca-ssl
161-
{{- end }}
162-
163-
{{- if and (eq .Values.deployment.mode "decoupled") .Values.deployment.certs.certsSecret }}
164-
- mountPath: /conf-client-ssl
165-
name: conf-client-ssl
166-
{{- end }}
167-
168150
{{- if .Values.etcd.auth.tls.enabled }}
169151
- mountPath: /etcd-ssl
170152
name: etcd-ssl
@@ -206,23 +188,6 @@ spec:
206188
secretName: {{ .Values.etcd.auth.tls.existingSecret | quote }}
207189
name: etcd-ssl
208190
{{- end }}
209-
{{- if and (eq .Values.deployment.role "control_plane") .Values.deployment.controlPlane.certsSecret }}
210-
- secret:
211-
secretName: {{ .Values.deployment.controlPlane.certsSecret | quote }}
212-
name: conf-server-ssl
213-
{{- end }}
214-
215-
{{- if and (eq .Values.deployment.mode "decoupled") .Values.deployment.certs.mTLSCACertSecret }}
216-
- secret:
217-
secretName: {{ .Values.deployment.certs.mTLSCACertSecret | quote }}
218-
name: conf-ca-ssl
219-
{{- end }}
220-
221-
{{- if and (eq .Values.deployment.mode "decoupled") .Values.deployment.certs.certsSecret }}
222-
- secret:
223-
secretName: {{ .Values.deployment.certs.certsSecret | quote }}
224-
name: conf-client-ssl
225-
{{- end }}
226191
{{- if .Values.apisix.setIDFromPodUID }}
227192
- downwardAPI:
228193
items:

charts/gateway/templates/configmap.yaml

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ data:
1717
{{- toYaml .Values.api7ee | nindent 6 }}
1818
{{- end }}
1919
apisix: # universal configurations
20-
{{- if not (eq .Values.deployment.role "control_plane") }}
2120
node_listen: # APISIX listening port
2221
- {{ .Values.gateway.http.containerPort }}
2322
{{- with .Values.gateway.http.additionalContainerPorts }}
2423
{{- toYaml . | nindent 8}}
2524
{{- end }}
26-
{{- end }}
2725
enable_heartbeat: true
2826
enable_admin: {{ .Values.admin.enabled }}
2927
enable_admin_cors: {{ .Values.admin.cors }}
@@ -232,25 +230,9 @@ data:
232230
{{- end }}
233231
234232
deployment:
235-
role: {{ .Values.deployment.role }}
236-
{{- if or (eq .Values.deployment.role "traditional") (eq .Values.deployment.role "control_plane") }}
237-
238-
{{- if eq .Values.deployment.role "traditional" }}
233+
role: traditional
239234
role_traditional:
240235
config_provider: etcd
241-
{{- end }}
242-
243-
{{- if eq .Values.deployment.role "control_plane" }}
244-
role_control_plane:
245-
config_provider: etcd
246-
conf_server:
247-
listen: 0.0.0.0:{{ .Values.deployment.controlPlane.confServerPort }}
248-
cert: "/conf-server-ssl/{{ .Values.deployment.controlPlane.cert }}"
249-
cert_key: "/conf-server-ssl/{{ .Values.deployment.controlPlane.certKey }}"
250-
{{- if .Values.deployment.certs.mTLSCACertSecret }}
251-
client_ca_cert: "/conf-ca-ssl/{{ .Values.deployment.certs.mTLSCACert }}"
252-
{{- end }}
253-
{{- end }}
254236
255237
admin:
256238
allow_admin: # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow
@@ -288,8 +270,6 @@ data:
288270
key: {{ .Values.admin.credentials.viewer }}
289271
{{- end }}
290272
role: viewer
291-
292-
{{- if not (eq .Values.deployment.role "data_plane") }}
293273
etcd:
294274
{{- if .Values.etcd.enabled }}
295275
host: # it's possible to define multiple etcd hosts addresses of the same etcd cluster.
@@ -329,30 +309,4 @@ data:
329309
{{- end }}
330310
{{- end }}
331311
{{- end }}
332-
{{- end }}
333-
{{- end }}
334-
335-
{{- if eq .Values.deployment.role "data_plane" }}
336-
role_data_plane:
337-
config_provider: control_plane
338-
control_plane:
339-
host:
340-
{{- range $.Values.deployment.dataPlane.controlPlane.host }}
341-
- {{ . | quote }}
342-
{{- end }}
343-
prefix: {{ .Values.deployment.dataPlane.controlPlane.prefix }}
344-
timeout: {{ .Values.deployment.dataPlane.controlPlane.timeout }}
345-
{{- end }}
346-
347-
{{- if eq .Values.deployment.mode "decoupled"}}
348-
{{- if .Values.deployment.certs.certsSecret }}
349-
certs:
350-
cert: "/conf-client-ssl/{{ .Values.deployment.certs.cert }}"
351-
cert_key: "/conf-client-ssl/{{ .Values.deployment.certs.cert_key }}"
352-
{{- if .Values.deployment.certs.mTLSCACertSecret }}
353-
trusted_ca_cert: "/conf-ca-ssl/{{ .Values.deployment.certs.mTLSCACert }}"
354-
{{- end }}
355-
{{- end }}
356-
{{- end }}
357-
358312
{{- end }}

charts/gateway/templates/service-control-plane.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.

charts/gateway/values.yaml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -214,39 +214,6 @@ rbac:
214214
create: false
215215

216216
deployment:
217-
# -- API7 Gateway deployment mode
218-
# Optional: traditional, decoupled
219-
#
220-
# ref: https://apisix.apache.org/docs/apisix/deployment-modes/
221-
mode: traditional
222-
223-
# -- Deployment role
224-
# Optional: traditional, data_plane, control_plane
225-
#
226-
# ref: https://apisix.apache.org/docs/apisix/deployment-modes/
227-
role: "traditional"
228-
229-
# -- used for control_plane deployment mode
230-
controlPlane:
231-
# -- conf Server address
232-
confServerPort: "9280"
233-
# -- secret name used by conf Server
234-
certsSecret: ""
235-
# -- conf Server CA cert name in certsSecret
236-
cert: ""
237-
# -- conf Server cert key name in certsSecret
238-
certKey: ""
239-
240-
# -- used for data_plane deployment mode
241-
dataPlane:
242-
controlPlane:
243-
# -- The hosts of the control_plane used by the data_plane
244-
host: []
245-
# -- The prefix of the control_plane used by the data_plane
246-
prefix: "/apisix"
247-
# -- Timeout when the data plane connects to the control plane
248-
timeout: 30
249-
250217
# -- certs used for certificates in decoupled mode
251218
certs:
252219
# -- secret name used for decoupled mode

charts/ingress-controller/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ Ingress Controller for API7
3636
| deployment.image.tag | string | `"2.0.1"` | |
3737
| deployment.nodeSelector | object | `{}` | |
3838
| deployment.podAnnotations | object | `{}` | |
39-
| deployment.podSecurityContext.allowPrivilegeEscalation | bool | `false` | |
40-
| deployment.podSecurityContext.capabilities.drop[0] | string | `"ALL"` | |
39+
| deployment.podSecurityContext | object | `{}` | |
4140
| deployment.replicas | int | `1` | |
41+
| deployment.securityContext | object | `{}` | |
4242
| deployment.tolerations | list | `[]` | |
4343
| deployment.topologySpreadConstraints | list | `[]` | |
4444
| fullnameOverride | string | `""` | |

0 commit comments

Comments
 (0)