cluster-api-provider-gcp
cluster-api-provider-gcp copied to clipboard
Internal Load Balancer doesn't support SharedVPC
/kind bug
What steps did you take and what happened: [A clear and concise description of what the bug is.]
Using the following load balancer configuration:
spec:
loadBalancer:
internalLoadBalancer: ${NAME_OF_SHAREDVPC_SUBNET}
loadBalancerType: "INTERNAL"
CAPG-controller-manager returns the following error:
E0701 14:43:51.301504 1 reconcile.go:525] "Error getting subnet for Internal Load Balancer" err="googleapi: Error 404: The resource 'projects/CURRENT_PROJECT/regions/us-central1/subnetworks/SHAREDVPC_SUBNET_NAME' was not found, notFound" controller="gcpcluster" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="GCPCluster" GCPCluster="NAMESPACE/CLUSTER_NAME" namespace="NAMESPACE" name="CLUSTER_NAME" reconcileID="ID_HASH"
What did you expect to happen:
The GCPCluster should use spec.network.hostProject
to check spec.loadBalancer.internalLoadBalancer.subnet
.
Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]
Environment:
- Cluster-api version: v1.7.0
- Rancher: v2.7.8
- Kubernetes version: (use
kubectl version
):
kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short. Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.13", GitCommit:"49433308be5b958856b6949df02b716e0a7cf0a3", GitTreeState:"clean", BuildDate:"2023-04-12T12:15:50Z", GoVersion:"go1.19.8", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.4
Server Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.12+rke2r1", GitCommit:"ef70d260f3d036fc22b30538576bbf6b36329995", GitTreeState:"clean", BuildDate:"2023-03-17T18:01:17Z", GoVersion:"go1.19.7 X:boringcrypto", Compiler:"gc", Platform:"linux/amd64"}
- OS (e.g. from
/etc/os-release
): Rocky Linux 9