Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"` | |
Expand Down
4 changes: 4 additions & 0 deletions charts/gateway/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -155,6 +158,7 @@ spec:
livenessProbe:
{{- toYaml .Values.gateway.livenessProbe | nindent 8 }}
{{- end }}
{{- end }}
lifecycle:
preStop:
exec:
Expand Down
14 changes: 10 additions & 4 deletions charts/gateway/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >-
Expand Down Expand Up @@ -262,12 +266,14 @@ data:
{{- end }}

deployment:
{{- if .Values.deployment.fallback_cp }}
role: data_plane
role_data_plane:
config_provider: yaml
{{- 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: json
{{- else }}
role: traditional
role_traditional:
Expand Down
10 changes: 8 additions & 2 deletions charts/gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -236,20 +236,26 @@ 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: {}
# # 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 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
Expand Down
Loading