As part of moving resources from terraform controllers to direct controllers (Epic #5954), we need to create the Go types for APIGatewayAPIConfig.
Currently, APIGatewayAPIConfig is managed by the Terraform controller (marked with tf2crd=true). The goal is to create the Go types in apis/apigateway/v1alpha1/ so that we can eventually migrate the controller implementation to the "direct" approach.
Instructions
This issue is part of Epic #5954.
As part of moving resources from terraform controllers to direct controllers (Epic #5954), we need to create the Go types for
APIGatewayAPIConfig.Currently,
APIGatewayAPIConfigis managed by the Terraform controller (marked withtf2crd=true). The goal is to create the Go types inapis/apigateway/v1alpha1/so that we can eventually migrate the controller implementation to the "direct" approach.Instructions
1. Create a generate.sh:
Create or append to
apis/apigateway/v1alpha1/generate.shwhich includesAPIGatewayAPIConfig.Example:
2. Set the write permission on the new
apis/apigateway/v1alpha1/generate.shfile. You should do this by running bothchmod +x apis/apigateway/v1alpha1/generate.shandgit add --chmod=+x apis/apigateway/v1alpha1/generate.sh.3. Generate Scaffolding:
Run
apis/apigateway/v1alpha1/generate.sh. This should createapis/apigateway/v1alpha1/apigatewayapiconfig_types.go.4. Iterate on Types:
Validate the generated CRD by running
dev/tasks/diff-crds. This tool prints any differences between the current branch and the master branch for the generated CRD.Modify
apis/apigateway/v1alpha1/apigatewayapiconfig_types.gountil the CRD matches the existing one. You should aim to minimize or eliminate any diffs detected by the tool. If diffs are found, you may need to add back missing fields or remove incorrectly added fields.Critical Acceptance Criteria:
dev/tasks/diff-crdsshould not show differences (or minimal acceptable ones like descriptions).5. Copyright Headers:
Ensure that new files have the correct copyright header:
// Copyright 2026 Google LLCPlease do not change the copyright on existing files.
6. Labels:
Ensure the controller-runtime annotations match the existing CRD labels, including:
The goal is to maintain these annotations, not add an annotation if it is missing.
7. Status:
status.observedGenerationshould be anint64.8. Generate Mappers:
dev/tasks/generate-types-and-mapperswill generate the mapper code once theapis/apigateway/v1alpha1/apigatewayapiconfig_types.gofile is generating an equivalent CRD.make all-binaryto ensure the generated mapper code compiles. Please fix any issue discovered by this compilation.This issue is part of Epic #5954.