This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
aws-vpce-operator (AVO) is a Kubernetes operator for OpenShift clusters that manages AWS VPC Endpoint connectivity. It creates and manages AWS VPC Endpoints, security groups, Route53 private hosted zones, and Kubernetes ExternalName services to enable private network connectivity to AWS VPC Endpoint Services.
make run- Run the operator locally (requires AWS credentials)make run ARGS="--zap-log-level=debug"- Run locally with debug loggingmake install- Install CRDs into the cluster viaoc apply -f ./deploy/crds/make uninstall- Remove CRDs from the cluster./boilerplate/_lib/container-make generate- Generate CRDs (only needed if modifying./api/)make boilerplate-update- Update boilerplate filesmake osde2e- Build e2e tests
The project uses the boilerplate system which provides:
make build- Build container imagemake push- Push container imagemake docker-build- Alternative build command
oc apply -f deploy/- Deploy all operator resources to clusteroc create namespace openshift-aws-vpce-operator- Create operator namespace
Main Controllers (main.go:75):
- VpcEndpointReconciler - Primary controller for VpcEndpoint CRs (enabled by default)
- VpcEndpointAcceptanceReconciler - Handles VPC endpoint service acceptance (disabled by default)
- VpcEndpointTemplateReconciler - Template-based endpoint creation (disabled by default)
API Versions:
api/v1alpha1/- Contains AvoConfig and VpcEndpointAcceptance typesapi/v1alpha2/- Contains VpcEndpoint type (primary CR)
AWS Integration (pkg/aws_client/):
- EC2 client for VPC endpoints and security groups
- Route53 client for DNS management
- STS client for role assumption
- Supports both direct AWS credentials and STS token assume role patterns
Helper Packages:
pkg/util/- Common utilities including AWS resource tagging helperspkg/infrastructures/- OpenShift Infrastructure CR utilitiespkg/dnses/- DNS configuration helperscontrollers/util/- Controller-specific utilities
VpcEndpoint (v1alpha2) - Primary resource:
- Creates AWS VPC Endpoint for specified service name
- Manages security group with ingress/egress rules
- Optionally creates Route53 private hosted zone and DNS records
- Optionally creates Kubernetes ExternalName service
VpcEndpointAcceptance (v1alpha1):
- Automates acceptance of VPC endpoint connections
- Supports cross-account role assumption for service provider accounts
For AWS STS ROSA clusters:
- Must have
infrastructures.config.openshift.io/defaultCR - Must have
dnses.config.openshift.io/defaultCR - Specific AWS IAM permissions for EC2, Route53 operations
- Proper AWS resource tagging for Hive cleanup integration
Local Development:
- AWS credentials via environment variables or role assumption
- Access to OpenShift/Kubernetes cluster with appropriate CRDs installed
- Go 1.24+ (from go.mod)
- All AWS resources created by the operator must include proper tags for Hive cleanup (use helpers in pkg/util/naming.go)
- The operator is designed specifically for AWS OpenShift clusters and leverages OpenShift-specific CRs
- FIPS mode is enabled in the build configuration
- Uses controller-runtime framework with event recording and health checks
- Boilerplate system provides standardized build, test, and deployment workflows