Skip to content

Commit a97c44d

Browse files
committed
f
1 parent ea214bb commit a97c44d

3 files changed

Lines changed: 16 additions & 9 deletions

File tree

charts/apisix-ingress-controller/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,15 @@ The same for container level, you need to set:
142142
| deployment.topologySpreadConstraints | list | `[]` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods |
143143
| fullnameOverride | string | `""` | |
144144
| gatewayProxy.createDefault | bool | `false` | Controls whether to create a default GatewayProxy custom resource. |
145-
| gatewayProxy.provider | object | `{"controlPlane":{"auth":{"adminKey":{"value":"edd1c9f034335f136f87ad84b625c8f1","valueFrom":{}},"type":"AdminKey"},"endpoints":[]},"pluginMetadata":{},"plugins":[],"type":"ControlPlane"}` | Configuration for the GatewayProxy provider connection |
146-
| gatewayProxy.provider.controlPlane | object | `{"auth":{"adminKey":{"value":"edd1c9f034335f136f87ad84b625c8f1","valueFrom":{}},"type":"AdminKey"},"endpoints":[]}` | ControlPlane provider specific configuration |
145+
| gatewayProxy.provider | object | `{"controlPlane":{"auth":{"adminKey":{"value":"edd1c9f034335f136f87ad84b625c8f1","valueFrom":{}},"type":"AdminKey"},"endpoints":[],"service":{"name":"","port":9180}},"pluginMetadata":{},"plugins":[],"type":"ControlPlane"}` | Configuration for the GatewayProxy provider connection |
146+
| gatewayProxy.provider.controlPlane | object | `{"auth":{"adminKey":{"value":"edd1c9f034335f136f87ad84b625c8f1","valueFrom":{}},"type":"AdminKey"},"endpoints":[],"service":{"name":"","port":9180}}` | ControlPlane provider specific configuration Either `endpoints` or `service` must be specified, but not both. |
147147
| gatewayProxy.provider.controlPlane.auth | object | `{"adminKey":{"value":"edd1c9f034335f136f87ad84b625c8f1","valueFrom":{}},"type":"AdminKey"}` | Authentication configuration for control plane connection |
148148
| gatewayProxy.provider.controlPlane.auth.adminKey | object | `{"value":"edd1c9f034335f136f87ad84b625c8f1","valueFrom":{}}` | AdminKey authentication configuration. Either `value` or `valueFrom` must be specified, but not both. |
149149
| gatewayProxy.provider.controlPlane.auth.adminKey.value | string | `"edd1c9f034335f136f87ad84b625c8f1"` | The admin key value for authentication. |
150150
| gatewayProxy.provider.controlPlane.auth.adminKey.valueFrom | object | `{}` | Reference to admin key stored in a Kubernetes Secret |
151151
| gatewayProxy.provider.controlPlane.auth.type | string | `AdminKey` | Authentication type. Only `AdminKey` is currently supported. |
152152
| gatewayProxy.provider.controlPlane.endpoints | list | `[]` | List of APISIX control plane Admin API endpoints. example: ["http://apisix-admin.default.svc.cluster.local:9180"] |
153+
| gatewayProxy.provider.controlPlane.service | object | `{"name":"","port":9180}` | Alternatively, reference a Kubernetes Service for the APISIX Admin API. |
153154
| gatewayProxy.provider.pluginMetadata | object | `{}` | Global plugin metadata shared by all instances of the same plugin. |
154155
| gatewayProxy.provider.plugins | list | `[]` | List of global plugins to be enabled on the GatewayProxy. |
155156
| gatewayProxy.provider.type | string | `"ControlPlane"` | Specifies the provider type for the GatewayProxy. |

charts/apisix-ingress-controller/templates/gatewayproxy.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,18 @@ spec:
2424
provider:
2525
type: {{ .Values.gatewayProxy.provider.type }}
2626
controlPlane:
27-
{{- with .Values.gatewayProxy.provider.controlPlane.endpoints }}
28-
{{- if (gt (len .) 0) }}
27+
{{- if .Values.gatewayProxy.provider.controlPlane.endpoints }}
2928
endpoints:
30-
{{- toYaml . | nindent 8 }}
29+
{{- toYaml .Values.gatewayProxy.provider.controlPlane.endpoints | nindent 8 }}
30+
{{- else if .Values.gatewayProxy.provider.controlPlane.service.name }}
31+
service:
32+
name: {{ .Values.gatewayProxy.provider.controlPlane.service.name }}
33+
port: {{ .Values.gatewayProxy.provider.controlPlane.service.port }}
3134
{{- else }}
3235
service:
3336
name: {{ .Values.apisix.adminService.name }}
3437
port: {{ .Values.apisix.adminService.port }}
3538
{{- end }}
36-
{{- end }}
3739

3840
{{- with .Values.gatewayProxy.provider.controlPlane.tlsVerify }}
3941
tlsVerify: {{ . }}

charts/apisix-ingress-controller/values.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,19 @@ gatewayProxy:
104104
provider:
105105
# -- Specifies the provider type for the GatewayProxy.
106106
type: ControlPlane
107-
107+
108108
# -- ControlPlane provider specific configuration
109+
# Either `endpoints` or `service` must be specified, but not both.
109110
controlPlane:
110111
# -- List of APISIX control plane Admin API endpoints.
111112
# example: ["http://apisix-admin.default.svc.cluster.local:9180"]
112113
endpoints: []
113114

115+
# -- Alternatively, reference a Kubernetes Service for the APISIX Admin API.
116+
service:
117+
name: ""
118+
port: 9180
119+
114120
# -- Authentication configuration for control plane connection
115121
auth:
116122
# -- Authentication type. Only `AdminKey` is currently supported.
@@ -126,9 +132,7 @@ gatewayProxy:
126132
# -- Reference to admin key stored in a Kubernetes Secret
127133
valueFrom: {}
128134
# secretKeyRef:
129-
# # -- Name of the Secret containing the admin key
130135
# name: apisix-admin-secret
131-
# # -- Key within the Secret containing the admin key value
132136
# key: admin-key
133137

134138
# -- List of global plugins to be enabled on the GatewayProxy.

0 commit comments

Comments
 (0)