Skip to content

Commit fa2a9a7

Browse files
Merge pull request #1784 from CrowleyRajapakse/apim-dpcp-sync
Adding k8s templates related to gateway to apim sync mode
2 parents 5f590ee + 08e4f1e commit fa2a9a7

6 files changed

Lines changed: 100 additions & 0 deletions

File tree

kubernetes/gateway-operator/config/gateway_values.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ gateway:
2828
xds_port: 18000
2929
shutdown_timeout: 15s
3030
gateway_id: "platform-gateway-id"
31+
controlplane:
32+
insecure_skip_verify: false
33+
reconnect_initial: 1s
34+
reconnect_max: 5m
35+
polling_interval: 15m
36+
deployment_push_enabled: false
37+
sync_batch_size: 50
38+
gateway_name: ""
39+
apim_oauth2_client_id: ""
40+
apim_oauth2_client_secret: ""
41+
apim_oauth2_username: ""
42+
apim_oauth2_password: ""
3143
policy_server:
3244
port: 18001
3345
tls:
@@ -140,6 +152,10 @@ gateway:
140152
level: info
141153
format: json
142154

155+
immutable_gateway:
156+
enabled: false
157+
artifacts_dir: "/etc/api-platform-gateway/immutable_gateway/artifacts"
158+
143159
# Raw TOML appended to generated config.toml (see gateway chart values.yaml)
144160
config_toml: ""
145161

kubernetes/helm/gateway-helm-chart/templates/gateway/gateway-config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ data:
4848
polling_interval = {{ $gc.controlplane.polling_interval | quote }}
4949
deployment_push_enabled = {{ $gc.controlplane.deployment_push_enabled }}
5050
sync_batch_size = {{ $gc.controlplane.sync_batch_size }}
51+
gateway_name = {{ $gc.controlplane.gateway_name | quote }}
52+
apim_oauth2_client_id = {{ $gc.controlplane.apim_oauth2_client_id | quote }}
53+
apim_oauth2_client_secret = {{ $gc.controlplane.apim_oauth2_client_secret | quote }}
54+
apim_oauth2_username = {{ $gc.controlplane.apim_oauth2_username | quote }}
55+
apim_oauth2_password = {{ $gc.controlplane.apim_oauth2_password | quote }}
5156
5257
{{- range $gc.encryption.providers }}
5358
[[controller.encryption.providers]]
@@ -228,6 +233,12 @@ data:
228233
{{ dict "policy_configurations" .Values.gateway.config.policy_configurations | toToml | indent 4 }}
229234
{{- end }}
230235

236+
{{- if .Values.gateway.config.immutable_gateway }}
237+
[immutable_gateway]
238+
enabled = {{ .Values.gateway.config.immutable_gateway.enabled }}
239+
artifacts_dir = {{ .Values.gateway.config.immutable_gateway.artifacts_dir | quote }}
240+
{{- end }}
241+
231242
{{- if .Values.gateway.config_toml }}
232243
{{ .Values.gateway.config_toml | indent 4 }}
233244
{{- end }}

kubernetes/helm/gateway-helm-chart/values.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,17 @@ gateway:
110110
# Number of deployments to fetch per batch during startup sync
111111
sync_batch_size: 50
112112

113+
# Friendly name shown for this gateway in the APIM control plane
114+
gateway_name: ""
115+
116+
# OAuth2 Option 1: Client Credentials flow
117+
apim_oauth2_client_id: ""
118+
apim_oauth2_client_secret: ""
119+
120+
# OAuth2 Option 2: Resource Owner Password Credentials flow
121+
apim_oauth2_username: ""
122+
apim_oauth2_password: ""
123+
113124
# Encryption provider configuration for secret management.
114125
# File paths must match the mount path set in gateway.controller.encryptionKeys.mountPath.
115126
encryption:
@@ -318,6 +329,11 @@ gateway:
318329
# Log format: json, text
319330
format: json
320331

332+
# Static API artifacts bundled with the gateway (see docs/gateway/immutable-gateway.md)
333+
immutable_gateway:
334+
enabled: false
335+
artifacts_dir: "/etc/api-platform-gateway/immutable_gateway/artifacts"
336+
321337
# Raw TOML string to append to the generated config.toml
322338
# Use this for additional configuration not covered by the structured values above
323339
# Example:

kubernetes/helm/operator-helm-chart/values.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,38 @@ gateway:
169169
# Directory containing policy definitions
170170
definitions_path: ./default-policies
171171

172+
# Control plane connection configuration
173+
# Note: host and token are set via gateway.controller.controlPlane and rendered as env vars in the deployment.
174+
controlplane:
175+
# Skip TLS certificate verification for the control plane connection (insecure, dev/test only)
176+
insecure_skip_verify: false
177+
178+
# Initial delay before retrying a failed control plane connection
179+
reconnect_initial: 1s
180+
181+
# Maximum delay between reconnection attempts (exponential backoff cap)
182+
reconnect_max: 5m
183+
184+
# How often to reconcile state with the control plane
185+
polling_interval: 15m
186+
187+
# Push API deployment events to the control plane
188+
deployment_push_enabled: false
189+
190+
# Number of deployments to fetch per batch during startup sync
191+
sync_batch_size: 50
192+
193+
# Friendly name shown for this gateway in the APIM control plane
194+
gateway_name: ""
195+
196+
# OAuth2 Option 1: Client Credentials flow
197+
apim_oauth2_client_id: ""
198+
apim_oauth2_client_secret: ""
199+
200+
# OAuth2 Option 2: Resource Owner Password Credentials flow
201+
apim_oauth2_username: ""
202+
apim_oauth2_password: ""
203+
172204
# Logging configuration
173205
logging:
174206
# Log level: "debug", "info", "warn", or "error"
@@ -367,6 +399,11 @@ gateway:
367399
# Log format: json, text
368400
format: json
369401

402+
# Static API artifacts bundled with the gateway (see docs/gateway/immutable-gateway.md)
403+
immutable_gateway:
404+
enabled: false
405+
artifacts_dir: "/etc/api-platform-gateway/immutable_gateway/artifacts"
406+
370407
policy_configurations: {}
371408

372409
# metadata for the generated shared ConfigMap (annotations / labels)

kubernetes/helm/resources/apim-apigateway-restapi-operator-demo/01-gateway-values-configmap.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ data:
1414
controlplane:
1515
# Skip TLS certificate verification for the control plane connection (insecure, dev/test only)
1616
insecure_skip_verify: true
17+
gateway_name: ""
18+
# OAuth2 Option 1: Client Credentials flow
19+
apim_oauth2_client_id: ""
20+
apim_oauth2_client_secret: ""
21+
# OAuth2 Option 2: Resource Owner Password Credentials flow
22+
apim_oauth2_username: ""
23+
apim_oauth2_password: ""
24+
immutable_gateway:
25+
enabled: false
26+
artifacts_dir: "/etc/api-platform-gateway/immutable_gateway/artifacts"
1727
controller:
1828
controlPlane:
1929
host: host.docker.internal:9444

kubernetes/helm/resources/apim-gateway-api-operator-demo/01-gateway-values-configmap.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ data:
1414
controlplane:
1515
# Skip TLS certificate verification for the control plane connection (insecure, dev/test only)
1616
insecure_skip_verify: true
17+
gateway_name: ""
18+
# OAuth2 Option 1: Client Credentials flow
19+
apim_oauth2_client_id: ""
20+
apim_oauth2_client_secret: ""
21+
# OAuth2 Option 2: Resource Owner Password Credentials flow
22+
apim_oauth2_username: ""
23+
apim_oauth2_password: ""
24+
immutable_gateway:
25+
enabled: false
26+
artifacts_dir: "/etc/api-platform-gateway/immutable_gateway/artifacts"
1727
controller:
1828
controlPlane:
1929
host: host.docker.internal:9444

0 commit comments

Comments
 (0)