-
Notifications
You must be signed in to change notification settings - Fork 67
Adding k8s templates related to gateway to apim sync mode #1784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -169,6 +169,38 @@ gateway: | |||||||||||||||||||||||||||||||||||||||||
| # Directory containing policy definitions | ||||||||||||||||||||||||||||||||||||||||||
| definitions_path: ./default-policies | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| # Control plane connection configuration | ||||||||||||||||||||||||||||||||||||||||||
| # Note: host and token are set via gateway.controller.controlPlane and rendered as env vars in the deployment. | ||||||||||||||||||||||||||||||||||||||||||
| controlplane: | ||||||||||||||||||||||||||||||||||||||||||
| # Skip TLS certificate verification for the control plane connection (insecure, dev/test only) | ||||||||||||||||||||||||||||||||||||||||||
| insecure_skip_verify: false | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| # Initial delay before retrying a failed control plane connection | ||||||||||||||||||||||||||||||||||||||||||
| reconnect_initial: 1s | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| # Maximum delay between reconnection attempts (exponential backoff cap) | ||||||||||||||||||||||||||||||||||||||||||
| reconnect_max: 5m | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| # How often to reconcile state with the control plane | ||||||||||||||||||||||||||||||||||||||||||
| polling_interval: 15m | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| # Push API deployment events to the control plane | ||||||||||||||||||||||||||||||||||||||||||
| deployment_push_enabled: false | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| # Number of deployments to fetch per batch during startup sync | ||||||||||||||||||||||||||||||||||||||||||
| sync_batch_size: 50 | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| # Friendly name shown for this gateway in the APIM control plane | ||||||||||||||||||||||||||||||||||||||||||
| gateway_name: "" | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| # OAuth2 Option 1: Client Credentials flow | ||||||||||||||||||||||||||||||||||||||||||
| apim_oauth2_client_id: "" | ||||||||||||||||||||||||||||||||||||||||||
| apim_oauth2_client_secret: "" | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| # OAuth2 Option 2: Resource Owner Password Credentials flow | ||||||||||||||||||||||||||||||||||||||||||
| apim_oauth2_username: "" | ||||||||||||||||||||||||||||||||||||||||||
| apim_oauth2_password: "" | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+196
to
+202
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Move APIM OAuth2 secret inputs to Secret references instead of inline values. Line 198 and Line 202 introduce direct credential value fields ( Suggested schema direction apim_oauth2_client_id: ""
- apim_oauth2_client_secret: ""
+ apim_oauth2_client_secret: "" # deprecated fallback
+ apim_oauth2_client_secret_from:
+ secretName: ""
+ key: client-secret
# OAuth2 Option 2: Resource Owner Password Credentials flow
apim_oauth2_username: ""
- apim_oauth2_password: ""
+ apim_oauth2_password: "" # deprecated fallback
+ apim_oauth2_password_from:
+ secretName: ""
+ key: passwordAs per coding guidelines, "Provide concise, actionable feedback focused on correctness and best practices... Use neutral, high-level language and validate safety without exposing sensitive context." 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| # Logging configuration | ||||||||||||||||||||||||||||||||||||||||||
| logging: | ||||||||||||||||||||||||||||||||||||||||||
| # Log level: "debug", "info", "warn", or "error" | ||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -367,6 +399,11 @@ gateway: | |||||||||||||||||||||||||||||||||||||||||
| # Log format: json, text | ||||||||||||||||||||||||||||||||||||||||||
| format: json | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| # Static API artifacts bundled with the gateway (see docs/gateway/immutable-gateway.md) | ||||||||||||||||||||||||||||||||||||||||||
| immutable_gateway: | ||||||||||||||||||||||||||||||||||||||||||
| enabled: false | ||||||||||||||||||||||||||||||||||||||||||
| artifacts_dir: "/etc/api-platform-gateway/immutable_gateway/artifacts" | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| policy_configurations: {} | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| # metadata for the generated shared ConfigMap (annotations / labels) | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move OAuth2 secret material out of
ConfigMapdata.Line 53 and Line 55 render secret values directly into
config.tomlinside a ConfigMap. Please sourceapim_oauth2_client_secretandapim_oauth2_passwordfrom a Kubernetes Secret (or secret-backed env/file) and keep only non-sensitive fields in this ConfigMap.🤖 Prompt for AI Agents