Description of problem:
The user-provided edge subnets (BYO VPC), created on zone type local-zone, is not tagged with kubernetes cluster tag `kubernetes.io/cluster/<infraID>` and value `shared` in install time. Subnets in regular/default zones are correctly tagged. The edge subnets created by installer in IPI is also tagged with value `owner`, so we need to check if there is an issue BYO VPC scenario or the implementation was just not replicated to edge subnets.
Version-Release number of selected component (if applicable):
4.19 (or since edge subnets, 4.14+?)
How reproducible:
always
Steps to Reproduce:
1. create vpc 2. create subnet in local zone 3. create install-config with regular zones, and edge zones 4. create the cluster 5. check the tags of subnets in local-zones
Actual results:
$ aws ec2 describe-subnets --subnet-ids $SUBNET_ID_PUB_WL | jq -r '.Subnets[] | [.AvailabilityZone, .Tags]' [ "us-east-1-nyc-1a", [ { "Key": "openshift_creationDate", "Value": "2025-01-24T00:14:44.445494+00:00" }, { "Key": "aws:cloudformation:stack-id", "Value": "arn:aws:cloudformation:us-east-1:[redacted]:stack/lzdemo-subnets-nyc-1a/10effe00-d9e0-11ef-b2ba-0ecca22ca195" }, { "Key": "aws:cloudformation:logical-id", "Value": "PublicSubnet" }, { "Key": "Name", "Value": "lzdemo-public-us-east-1-nyc-1a" }, { "Key": "aws:cloudformation:stack-name", "Value": "lzdemo-subnets-nyc-1a" } ] ]
Expected results:
$ aws ec2 describe-subnets --subnet-ids $SUBNET_ID_PUB_WL | jq -r '.Subnets[] | [.AvailabilityZone, .Tags]' [ "us-east-1-nyc-1a", [ { "Key": "openshift_creationDate", "Value": "2025-01-24T00:14:44.445494+00:00" }, { "Key": "aws:cloudformation:stack-id", "Value": "arn:aws:cloudformation:us-east-1:[redacted]:stack/lzdemo-subnets-nyc-1a/10effe00-d9e0-11ef-b2ba-0ecca22ca195" }, { "Key": "aws:cloudformation:logical-id", "Value": "PublicSubnet" }, { "Key": "Name", "Value": "lzdemo-public-us-east-1-nyc-1a" }, { "Key": "aws:cloudformation:stack-name", "Value": "lzdemo-subnets-nyc-1a" }, + { + "Key": "kubernetes.io/cluster/lzdemo-4znjd", + "Value": "shared" + }, ] ]
Additional info:
- Example of result in IPI deployment with edge zone (fully created by installer) ``` $ aws ec2 describe-subnets --subnet-ids subnet-08d8d32c7ee4b629c | jq -r '.Subnets[] | [.AvailabilityZone, .Tags]' [ "us-east-1-nyc-1a", [ { "Key": "kubernetes.io/role/elb", "Value": "1" }, { "Key": "Name", "Value": "lzipi-ljgzl-subnet-public-us-east-1-nyc-1a" }, { "Key": "sigs.k8s.io/cluster-api-provider-aws/role", "Value": "public" }, { "Key": "openshift_creationDate", "Value": "2025-01-24T00:14:44.445494+00:00" }, { "Key": "sigs.k8s.io/cluster-api-provider-aws/cluster/lzipi-ljgzl", "Value": "owned" }, { "Key": "kubernetes.io/cluster/lzipi-ljgzl", "Value": "owned" } ] ] ```
- blocks
-
OCPBUGS-49792 [aws/edge/byo-vpc] Kubernetes cluster tag isn't set in edge deployments BYO VPC kubernetes.io/cluster/<InfraID>=shared
-
- Verified
-
- is blocked by
-
OCPBUGS-49594 [aws/byo-public-ipv4] missing permission ec2:ReleaseAddress when destroying the cluster
-
- Verified
-
- is cloned by
-
OCPBUGS-49792 [aws/edge/byo-vpc] Kubernetes cluster tag isn't set in edge deployments BYO VPC kubernetes.io/cluster/<InfraID>=shared
-
- Verified
-
- links to