From 1edf39c64d9c5ed83f1532c51242cbad8a38ce06 Mon Sep 17 00:00:00 2001 From: Abhishek Choudhary Date: Thu, 18 Dec 2025 19:48:51 +0545 Subject: [PATCH 1/8] feat: disable readiness and liveness probes in backup mode Signed-off-by: Abhishek Choudhary --- charts/gateway/templates/_pod.tpl | 4 ++++ charts/gateway/values.yaml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/charts/gateway/templates/_pod.tpl b/charts/gateway/templates/_pod.tpl index 7f600eb..cb23087 100644 --- a/charts/gateway/templates/_pod.tpl +++ b/charts/gateway/templates/_pod.tpl @@ -138,6 +138,9 @@ spec: {{- end }} {{- end }} {{- end }} + {{- if and .Values.deployment.fallback_cp.mode (eq .Values.deployment.fallback_cp.mode "write") }} + {{- /* Disable probes when fallback_cp mode is set to write */ -}} + {{- else }} {{- if .Values.gateway.readinessProbe }} readinessProbe: {{- toYaml .Values.gateway.readinessProbe | nindent 8 }} @@ -155,6 +158,7 @@ spec: livenessProbe: {{- toYaml .Values.gateway.livenessProbe | nindent 8 }} {{- end }} + {{- end }} lifecycle: preStop: exec: diff --git a/charts/gateway/values.yaml b/charts/gateway/values.yaml index 8fb04b2..cff2c7b 100644 --- a/charts/gateway/values.yaml +++ b/charts/gateway/values.yaml @@ -239,6 +239,8 @@ deployment: # -- use cloud storage as the fallback control plane, # should be consistent with the same configuration in control plane side. fallback_cp: {} + # interval: 10 + # mode: "write" # aws_s3: # access_key: "access" # secret_key: "secret" From 950ae02a40df03b8c758343cd05c73bdf5cf75ac Mon Sep 17 00:00:00 2001 From: Nic Date: Mon, 22 Dec 2025 15:01:57 +0800 Subject: [PATCH 2/8] f Signed-off-by: Nic --- charts/gateway/templates/configmap.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/gateway/templates/configmap.yaml b/charts/gateway/templates/configmap.yaml index a17a207..473e8d8 100644 --- a/charts/gateway/templates/configmap.yaml +++ b/charts/gateway/templates/configmap.yaml @@ -262,7 +262,7 @@ data: {{- end }} deployment: - {{- if .Values.deployment.fallback_cp }} + {{- if and (.Values.deployment.fallback_cp) (ne .Values.deployment.fallback_cp.mode "write") }} role: data_plane role_data_plane: config_provider: yaml From e82fb7c83c945e5efca30c29e21e3368c30ab74a Mon Sep 17 00:00:00 2001 From: Nic Date: Mon, 22 Dec 2025 15:28:05 +0800 Subject: [PATCH 3/8] f Signed-off-by: Nic --- charts/gateway/templates/configmap.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/charts/gateway/templates/configmap.yaml b/charts/gateway/templates/configmap.yaml index 473e8d8..2b9333d 100644 --- a/charts/gateway/templates/configmap.yaml +++ b/charts/gateway/templates/configmap.yaml @@ -262,12 +262,14 @@ data: {{- end }} deployment: + {{- if and (.Values.deployment.fallback_cp) }} + fallback_cp: + {{- toYaml .Values.deployment.fallback_cp | nindent 8 }} + {{- end }} {{- if and (.Values.deployment.fallback_cp) (ne .Values.deployment.fallback_cp.mode "write") }} role: data_plane role_data_plane: config_provider: yaml - fallback_cp: - {{- toYaml .Values.deployment.fallback_cp | nindent 8 }} {{- else }} role: traditional role_traditional: From 50544a4a24efafa0e0187d70ef0889cf2f28c0c0 Mon Sep 17 00:00:00 2001 From: Nic Date: Mon, 22 Dec 2025 15:40:56 +0800 Subject: [PATCH 4/8] F Signed-off-by: Nic --- charts/gateway/templates/configmap.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/charts/gateway/templates/configmap.yaml b/charts/gateway/templates/configmap.yaml index 2b9333d..037391a 100644 --- a/charts/gateway/templates/configmap.yaml +++ b/charts/gateway/templates/configmap.yaml @@ -186,7 +186,11 @@ data: {{- toYaml .Values.apisix.stream.luaSharedDict | nindent 10 }} {{- end }} http: + {{- if and (.Values.deployment.fallback_cp) (eq .Values.deployment.fallback_cp.mode "write") }} + enable_access_log: false + {{- else }} enable_access_log: {{ .Values.logs.enableAccessLog }} + {{- end }} {{- if .Values.logs.enableAccessLog }} access_log: "{{ .Values.logs.accessLog }}" access_log_format: >- From 98260edab9c9fc6dcb88b9265dcc82edde6c6694 Mon Sep 17 00:00:00 2001 From: Nic Date: Mon, 22 Dec 2025 16:51:08 +0800 Subject: [PATCH 5/8] F Signed-off-by: Nic --- charts/gateway/templates/configmap.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/gateway/templates/configmap.yaml b/charts/gateway/templates/configmap.yaml index 037391a..e6db6b3 100644 --- a/charts/gateway/templates/configmap.yaml +++ b/charts/gateway/templates/configmap.yaml @@ -273,7 +273,7 @@ data: {{- if and (.Values.deployment.fallback_cp) (ne .Values.deployment.fallback_cp.mode "write") }} role: data_plane role_data_plane: - config_provider: yaml + config_provider: json {{- else }} role: traditional role_traditional: From 422401581a49d2dbeda7dea538337873ac8733f0 Mon Sep 17 00:00:00 2001 From: Nic Date: Mon, 22 Dec 2025 19:40:28 +0800 Subject: [PATCH 6/8] F Signed-off-by: Nic --- charts/gateway/values.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/gateway/values.yaml b/charts/gateway/values.yaml index cff2c7b..cb85fbf 100644 --- a/charts/gateway/values.yaml +++ b/charts/gateway/values.yaml @@ -240,6 +240,7 @@ deployment: # should be consistent with the same configuration in control plane side. fallback_cp: {} # interval: 10 + # -- Allowed values: `write`, `read`, default `read` # mode: "write" # aws_s3: # access_key: "access" From 3fbd90a9211fab22cd1ec22a8e58ef685827be6f Mon Sep 17 00:00:00 2001 From: Nic Date: Mon, 22 Dec 2025 20:15:03 +0800 Subject: [PATCH 7/8] F Signed-off-by: Nic --- charts/gateway/README.md | 2 +- charts/gateway/values.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/gateway/README.md b/charts/gateway/README.md index d297d5d..fea8a46 100644 --- a/charts/gateway/README.md +++ b/charts/gateway/README.md @@ -147,7 +147,7 @@ The command removes all the Kubernetes components associated with the chart and | 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.fallback_cp | object | `{}` | use cloud storage as the fallback control plane, should be consistent with the same configuration in control plane side. | +| deployment.fallback_cp | object | `{}` | use cloud storage as the fallback control plane | | discovery.enabled | bool | `false` | Enable or disable API7 Gateway integration service discovery | | 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) | | dns.resolvers[0] | string | `"127.0.0.1"` | | diff --git a/charts/gateway/values.yaml b/charts/gateway/values.yaml index cb85fbf..142e504 100644 --- a/charts/gateway/values.yaml +++ b/charts/gateway/values.yaml @@ -236,12 +236,12 @@ rbac: create: false deployment: - # -- use cloud storage as the fallback control plane, - # should be consistent with the same configuration in control plane side. + # -- use cloud storage as the fallback control plane fallback_cp: {} - # interval: 10 - # -- Allowed values: `write`, `read`, default `read` + # # Allowed values: `write`, `read`, default `read` # mode: "write" + # # how often (in seconds) to sync data to cloud storage, only used when mode is `write` + # interval: 10 # aws_s3: # access_key: "access" # secret_key: "secret" From c5fe4e990657c1a81f246344a3399ffc0112b2bc Mon Sep 17 00:00:00 2001 From: Nic Date: Mon, 22 Dec 2025 20:17:07 +0800 Subject: [PATCH 8/8] F Signed-off-by: Nic --- charts/gateway/values.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/charts/gateway/values.yaml b/charts/gateway/values.yaml index 142e504..ccd3e77 100644 --- a/charts/gateway/values.yaml +++ b/charts/gateway/values.yaml @@ -242,17 +242,20 @@ deployment: # mode: "write" # # how often (in seconds) to sync data to cloud storage, only used when mode is `write` # interval: 10 + # # aws s3 configuration, when access key or secret key are not set, will use the IAM role attached to the pod # aws_s3: # access_key: "access" # secret_key: "secret" # region: "ap-south-1" # resource_bucket: "to-push-resource-data" # config_bucket: "to-push-config-data" + # # azure blob storage configuration, when account key is not set, will use the Managed Identity attached to the pod # azure_blob: # account_name: "$YOUR_ACCOUNT_NAME" # account_key: "$YOUR_ACCOUNT_KEY" # resource_container: yaml # config_container: config + # # optional, when not set, will use the default endpoint: "https://$YOUR_ACCOUNT_NAME.blob.core.windows.net" # endpoint: "$YOUR_AZURE_BLOB_ENDPOINT" # -- certs used for certificates in decoupled mode