Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-49792

[aws/edge/byo-vpc] Kubernetes cluster tag isn't set in edge deployments BYO VPC kubernetes.io/cluster/<InfraID>=shared

XMLWordPrintable

    • None
    • 2
    • OpenShift SPLAT - Sprint 266
    • 1
    • False
    • Hide

      None

      Show
      None
    • Hide
      * Previously, when installing a cluster on {aws-short} in existing subnets, for bring your own virtual private cloud (BYO VPC), in edge zones, {zone-type}, the installation program did not tag the subnets’ edge resource with `kubernetes.io/cluster/<InfraID>:shared`. With this release, a fix ensures that all subnets that are used in the `install-config.yaml` file contain the required tags. (link:https://issues.redhat.com/browse/OCPBUGS-49792 [*OCPBUGS-49792*])
      Show
      * Previously, when installing a cluster on {aws-short} in existing subnets, for bring your own virtual private cloud (BYO VPC), in edge zones, {zone-type}, the installation program did not tag the subnets’ edge resource with `kubernetes.io/cluster/<InfraID>:shared`. With this release, a fix ensures that all subnets that are used in the `install-config.yaml` file contain the required tags. (link: https://issues.redhat.com/browse/OCPBUGS-49792 [* OCPBUGS-49792 *])
    • Bug Fix
    • Proposed

      This is a clone of issue OCPBUGS-48827. The following is the description of the original issue:

      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"
          }
        ]
      ]
      
      ```

              rhn-support-mrbraga Marco Braga
              openshift-crt-jira-prow OpenShift Prow Bot
              Yunfei Jiang Yunfei Jiang
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: