Skip to content

[APIP] Update Operator helm-chart#2749

Merged
DDH13 merged 12 commits into
wso2:mainfrom
DDH13:main.helm-1.2
Jul 21, 2026
Merged

[APIP] Update Operator helm-chart#2749
DDH13 merged 12 commits into
wso2:mainfrom
DDH13:main.helm-1.2

Conversation

@DDH13

@DDH13 DDH13 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Related to #2765

This pull request introduces the new v1 API group for the gateway-operator, adding stable, production-ready CRDs and types for key resources such as APIGateway, ApiKey, and Certificate. It also updates the operator configuration to register these new APIs, and updates documentation to reference the new chart version. The new types provide improved structure, validation, and support for secrets and status management, aligning with Kubernetes best practices.

The most important changes are:

API Group and Versioning

  • Added a new v1 API group under gateway.api-platform.wso2.com, including group version registration and scheme setup in groupversion_info.go. This establishes v1 as the storage and conversion hub for the operator’s CRDs. [1] [2]
  • Updated the PROJECT configuration to register APIGateway and RestApi resources for both v1 and v1alpha1 APIs, enabling dual-version support. [1] [2]

New CRD Types

  • Introduced APIGateway, ApiKey, and Certificate types in the new v1 API, with detailed spec and status fields, improved validation, and support for referencing secrets and config maps. These types are now the canonical schema for these resources. [1] [2] [3]
  • Added common types for secret value sourcing and resource status management, shared across all new v1 CRDs, improving consistency and security.

Documentation and Chart Updates

  • Updated the installation instructions in README.md to reference the new Helm chart version 0.10.0, ensuring users install the operator with support for the new APIs.

These changes lay the foundation for stable, production-grade CRDs and future extensibility in the gateway-operator.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 110 files, which is 10 over the limit of 100.

To get a review, narrow the scope:
• coderabbit review --committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5b06d3ef-3cbb-40c4-9208-0a535eb84b9d

📥 Commits

Reviewing files that changed from the base of the PR and between 8a8d53a and 15f473b.

📒 Files selected for processing (110)
  • kubernetes/gateway-operator/PROJECT
  • kubernetes/gateway-operator/README.md
  • kubernetes/gateway-operator/api/v1/apigateway_types.go
  • kubernetes/gateway-operator/api/v1/apikey_types.go
  • kubernetes/gateway-operator/api/v1/certificate_types.go
  • kubernetes/gateway-operator/api/v1/common_types.go
  • kubernetes/gateway-operator/api/v1/conversion.go
  • kubernetes/gateway-operator/api/v1/groupversion_info.go
  • kubernetes/gateway-operator/api/v1/llmprovider_types.go
  • kubernetes/gateway-operator/api/v1/llmprovidertemplate_types.go
  • kubernetes/gateway-operator/api/v1/llmproxy_types.go
  • kubernetes/gateway-operator/api/v1/mcp_types.go
  • kubernetes/gateway-operator/api/v1/operation_match.go
  • kubernetes/gateway-operator/api/v1/policy_types.go
  • kubernetes/gateway-operator/api/v1/restapi_types.go
  • kubernetes/gateway-operator/api/v1/secret_types.go
  • kubernetes/gateway-operator/api/v1/subscription_types.go
  • kubernetes/gateway-operator/api/v1/subscriptionplan_types.go
  • kubernetes/gateway-operator/api/v1/zz_generated.deepcopy.go
  • kubernetes/gateway-operator/api/v1alpha1/conversion.go
  • kubernetes/gateway-operator/api/v1alpha1/conversion_test.go
  • kubernetes/gateway-operator/api/v1alpha1/crd_schema_identity_test.go
  • kubernetes/gateway-operator/cmd/main.go
  • kubernetes/gateway-operator/config/config.yaml
  • kubernetes/gateway-operator/config/crd/bases/gateway.api-platform.wso2.com_apigateways.yaml
  • kubernetes/gateway-operator/config/crd/bases/gateway.api-platform.wso2.com_apikeys.yaml
  • kubernetes/gateway-operator/config/crd/bases/gateway.api-platform.wso2.com_apipolicies.yaml
  • kubernetes/gateway-operator/config/crd/bases/gateway.api-platform.wso2.com_certificates.yaml
  • kubernetes/gateway-operator/config/crd/bases/gateway.api-platform.wso2.com_llmproviders.yaml
  • kubernetes/gateway-operator/config/crd/bases/gateway.api-platform.wso2.com_llmprovidertemplates.yaml
  • kubernetes/gateway-operator/config/crd/bases/gateway.api-platform.wso2.com_llmproxies.yaml
  • kubernetes/gateway-operator/config/crd/bases/gateway.api-platform.wso2.com_managedsecrets.yaml
  • kubernetes/gateway-operator/config/crd/bases/gateway.api-platform.wso2.com_mcps.yaml
  • kubernetes/gateway-operator/config/crd/bases/gateway.api-platform.wso2.com_restapis.yaml
  • kubernetes/gateway-operator/config/crd/bases/gateway.api-platform.wso2.com_subscriptionplans.yaml
  • kubernetes/gateway-operator/config/crd/bases/gateway.api-platform.wso2.com_subscriptions.yaml
  • kubernetes/gateway-operator/config/samples/api_v1_apigateway.yaml
  • kubernetes/gateway-operator/config/samples/api_v1_restapi.yaml
  • kubernetes/gateway-operator/internal/auth/auth_helper.go
  • kubernetes/gateway-operator/internal/controller/apigateway_controller.go
  • kubernetes/gateway-operator/internal/controller/apikey_controller.go
  • kubernetes/gateway-operator/internal/controller/apikey_external_deps_test.go
  • kubernetes/gateway-operator/internal/controller/certificate_controller.go
  • kubernetes/gateway-operator/internal/controller/gateway_infra.go
  • kubernetes/gateway-operator/internal/controller/generic_reconciler.go
  • kubernetes/gateway-operator/internal/controller/httproute_compile.go
  • kubernetes/gateway-operator/internal/controller/httproute_confighash_stability_test.go
  • kubernetes/gateway-operator/internal/controller/httproute_controller.go
  • kubernetes/gateway-operator/internal/controller/httproute_direct_response_policy.go
  • kubernetes/gateway-operator/internal/controller/httproute_direct_response_policy_test.go
  • kubernetes/gateway-operator/internal/controller/httproute_enqueue.go
  • kubernetes/gateway-operator/internal/controller/httproute_enqueue_test.go
  • kubernetes/gateway-operator/internal/controller/httproute_filters.go
  • kubernetes/gateway-operator/internal/controller/httproute_mapper.go
  • kubernetes/gateway-operator/internal/controller/httproute_mapper_test.go
  • kubernetes/gateway-operator/internal/controller/httproute_match_emit_test.go
  • kubernetes/gateway-operator/internal/controller/httproute_policies.go
  • kubernetes/gateway-operator/internal/controller/httproute_policy_params_resolve.go
  • kubernetes/gateway-operator/internal/controller/httproute_policy_params_resolve_test.go
  • kubernetes/gateway-operator/internal/controller/httproute_redirect_policy.go
  • kubernetes/gateway-operator/internal/controller/httproute_redirect_policy_test.go
  • kubernetes/gateway-operator/internal/controller/k8s_gateway_controller.go
  • kubernetes/gateway-operator/internal/controller/llmprovider_controller.go
  • kubernetes/gateway-operator/internal/controller/llmprovidertemplate_controller.go
  • kubernetes/gateway-operator/internal/controller/llmproxy_controller.go
  • kubernetes/gateway-operator/internal/controller/llmproxy_controller_test.go
  • kubernetes/gateway-operator/internal/controller/managedsecret_controller.go
  • kubernetes/gateway-operator/internal/controller/management_llm_enqueue.go
  • kubernetes/gateway-operator/internal/controller/management_resources_helpers.go
  • kubernetes/gateway-operator/internal/controller/management_upstream_auth_payload_test.go
  • kubernetes/gateway-operator/internal/controller/management_valuefrom_enqueue.go
  • kubernetes/gateway-operator/internal/controller/management_valuefrom_fingerprint.go
  • kubernetes/gateway-operator/internal/controller/management_valuefrom_fingerprint_test.go
  • kubernetes/gateway-operator/internal/controller/mcp_controller.go
  • kubernetes/gateway-operator/internal/controller/payload_metadata_test.go
  • kubernetes/gateway-operator/internal/controller/restapi_controller.go
  • kubernetes/gateway-operator/internal/controller/restapi_enqueue.go
  • kubernetes/gateway-operator/internal/controller/restapi_enqueue_test.go
  • kubernetes/gateway-operator/internal/controller/restapi_policy_valuefrom.go
  • kubernetes/gateway-operator/internal/controller/restapi_policy_valuefrom_test.go
  • kubernetes/gateway-operator/internal/controller/serialization_test.go
  • kubernetes/gateway-operator/internal/controller/subscription_controller.go
  • kubernetes/gateway-operator/internal/controller/subscription_external_deps_test.go
  • kubernetes/gateway-operator/internal/controller/subscriptionplan_controller.go
  • kubernetes/gateway-operator/internal/gatewayclient/envelope_payload_test.go
  • kubernetes/gateway-operator/internal/gatewayclient/rest_api.go
  • kubernetes/gateway-operator/internal/gatewayclient/yaml_payload.go
  • kubernetes/gateway-operator/internal/gatewayclient/yaml_payload_test.go
  • kubernetes/gateway-operator/internal/k8sutil/examples/template_usage.go
  • kubernetes/gateway-operator/internal/registry/gateway_registry.go
  • kubernetes/gateway-operator/internal/secretsource/resolver.go
  • kubernetes/gateway-operator/internal/secretsource/resolver_test.go
  • kubernetes/gateway-operator/internal/selector/api_selector.go
  • kubernetes/helm/operator-helm-chart/Chart.yaml
  • kubernetes/helm/operator-helm-chart/README.md
  • kubernetes/helm/operator-helm-chart/crds/gateway.api-platform.wso2.com_apigateways.yaml
  • kubernetes/helm/operator-helm-chart/crds/gateway.api-platform.wso2.com_apikeys.yaml
  • kubernetes/helm/operator-helm-chart/crds/gateway.api-platform.wso2.com_apipolicies.yaml
  • kubernetes/helm/operator-helm-chart/crds/gateway.api-platform.wso2.com_certificates.yaml
  • kubernetes/helm/operator-helm-chart/crds/gateway.api-platform.wso2.com_llmproviders.yaml
  • kubernetes/helm/operator-helm-chart/crds/gateway.api-platform.wso2.com_llmprovidertemplates.yaml
  • kubernetes/helm/operator-helm-chart/crds/gateway.api-platform.wso2.com_llmproxies.yaml
  • kubernetes/helm/operator-helm-chart/crds/gateway.api-platform.wso2.com_managedsecrets.yaml
  • kubernetes/helm/operator-helm-chart/crds/gateway.api-platform.wso2.com_mcps.yaml
  • kubernetes/helm/operator-helm-chart/crds/gateway.api-platform.wso2.com_restapis.yaml
  • kubernetes/helm/operator-helm-chart/crds/gateway.api-platform.wso2.com_subscriptionplans.yaml
  • kubernetes/helm/operator-helm-chart/crds/gateway.api-platform.wso2.com_subscriptions.yaml
  • kubernetes/helm/operator-helm-chart/templates/NOTES.txt
  • kubernetes/helm/operator-helm-chart/templates/configmap.yaml
  • kubernetes/helm/operator-helm-chart/values.yaml

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Review on demand using usage pricing
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@DDH13 DDH13 changed the title [APIP] Add Subscription CRDs with webhook support and Helm chart updates [APIP] Add Subscription CRDs and promote gateway-operator CRDs to v1 Jul 20, 2026
@DDH13 DDH13 changed the title [APIP] Add Subscription CRDs and promote gateway-operator CRDs to v1 [APIP] Update Operator helm-chart Jul 20, 2026
DDH13 added 8 commits July 21, 2026 13:37
- Introduced CustomResourceDefinitions for SubscriptionPlan and Subscription, enabling management of subscription plans and subscriptions within the WSO2 API Gateway.
- Implemented a conversion webhook for the CRDs, allowing for seamless versioning and updates.
- Enhanced the operator deployment to support webhook functionality, including dynamic port configuration and certificate management.
- Added a service for the webhook to facilitate communication between the operator and the Kubernetes API.
- Updated Helm chart values to include configuration options for enabling/disabling the webhook and setting certificate validity.
The v1alpha1/v1 schemas are field-identical today (see
api/v1alpha1/conversion.go), and the management API's 0.9->1.0 /
v1alpha2->v1 bump was a pure version-label change with no schema drift,
so a live conversion webhook isn't earning its operational cost yet
(cert lifecycle, and coupling CRD read/write availability to operator
pod health). Keep the Hub()/ConvertTo()/ConvertFrom() Go types as-is so
switching to a real webhook later is a small, isolated change if a
genuine breaking schema change is ever planned.

- cmd/main.go: remove conversion webhook registration, ENABLE_WEBHOOKS
  gating, webhook readyz check, and the webhook TLS server/CertDir.
- subscriptionplan_controller.go: make plan recovery-by-name reactive
  (only after the gateway returns 409 on create), matching
  subscription_controller.go, instead of proactively adopting any
  gateway-wide plan with a matching (non-unique) planName.
- operator-crds.yaml: replace direct CRD-as-template rendering (which
  breaks `helm upgrade` for any CRD previously installed via the
  chart's native crds/ directory, since that path never carries Helm's
  ownership annotations) with a pre-install/pre-upgrade hook ConfigMap
  + Job that kubectl-applies the CRDs directly, bypassing Helm's
  ownership tracking entirely. Conversion strategy is now
  unconditionally None.
- crd-manager-rbac.yaml: cluster-scoped RBAC for the apply-crds Job
  (CRDs aren't namespaced, so this can't ride on the namespace-scoped
  Role path).
- Remove webhook-service.yaml and the webhook.* values/deployment
  wiring (port, cert volume/mount, ENABLE_WEBHOOKS env).
- Chart.yaml: bump version for the CRD packaging/lifecycle change.
crd-manager-rbac.yaml was a plain (non-hook) resource, so on helm upgrade
it only applied AFTER pre-install/pre-upgrade hooks ran — the apply-crds
Job (a pre-upgrade hook) tried to use a ClusterRoleBinding that didn't
exist yet on the very upgrade that introduces it, failing with:

  customresourcedefinitions.apiextensions.k8s.io "..." is forbidden:
  User "system:serviceaccount:<ns>:controller-manager" cannot get
  resource "customresourcedefinitions" in API group "apiextensions.k8s.io"
  at the cluster scope

Reproduced by installing the pre-PR chart (CRDs in crds/, v1alpha1 only)
then helm upgrade --install to this chart, against a real rancher-desktop
cluster. Fix: make the ClusterRole/ClusterRoleBinding pre-install,pre-upgrade
hooks too, weighted before the ConfigMap (0) and apply-crds Job (1).

Re-ran the same install-old/upgrade-to-new repro after the fix: upgrade
succeeded, apply-crds Job completed and self-cleaned, all 12 CRDs ended up
served at v1+v1alpha1 with conversion strategy None and v1 as storage, and
a v1alpha1 SubscriptionPlan CR applied post-upgrade reconciled correctly.
… RestApi CRDs; enhance RBAC and cleanup job definitions
DDH13 added 4 commits July 21, 2026 15:07
- Introduced CRDs for Subscription and SubscriptionPlan under the group gateway.api-platform.wso2.com.
- Each CRD includes detailed specifications, status fields, and validation rules.
- Updated NOTES.txt to reflect the installation method of CRDs.
- Modified cleanup finalizer job to use a configurable service account name.
- Removed deprecated RBAC configurations and CRD apply job templates to streamline the chart.
@DDH13
DDH13 merged commit 9b65c90 into wso2:main Jul 21, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants