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

Installer is ensuring userTags on subnets in BYO VPC deployments on AWS

XMLWordPrintable

    • No
    • Proposed
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Release Note Not Required
    • In Progress

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

      Description of problem:

      openshift-install is creating user-defined tags (platform.aws.userTags) in subnets on AWS of BYO VPC (unmanaged VPC) deployment when using CAPA.
      
      The documentation[1] for userTags state:
      > A map of keys and values that the installation program adds as tags to all resources that it creates.
      
      So when the network (VPC and subnets) are managed by user (BYO VPC), the installer should not create additional tags when provided in install-config.yaml. 
      
      Investigating in CAPA codebase, the feature gate TagUnmanagedNetworkResources is enabled, and the subnet is propagating the userTags in the reconciliation loop[2].
      
      [1] https://docs.openshift.com/container-platform/4.15/installing/installing_aws/installation-config-parameters-aws.html
      [2] https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/pkg/cloud/services/network/subnets.go#L618

      Version-Release number of selected component (if applicable):

      4.16.0-ec.6-x86_64

      How reproducible:

      always

      Steps to Reproduce:

      - 1. create VPC and subnets using CloudFormation. Example template: https://github.com/openshift/installer/blob/master/upi/aws/cloudformation/01_vpc.yaml
      - 2. create install-config with user-tags and subnet IDs to install the cluster:
      - 3. create the cluster with feature gate for CAPI 
      
      ```
      featureSet: CustomNoUpgrade
      featureGates:
      - ClusterAPIInstall=true
      metadata:
        name: "${CLUSTER_NAME}"
      platform:
        aws:
          region: us-east-1
          subnets:
          - subnet-0165c70573a45651c
          - subnet-08540527fffeae3e9
          userTags:
            x-red-hat-clustertype: installer
            x-red-hat-managed: "true"
      ```

       

      Actual results:

      installer/CAPA is setting the user-defined tags in unmanaged subnets

      Expected results:

      - installer/CAPA does not create userTags on unmanaged subnets 
      - userTags is applied for regular/standard workflow (managed VPC) with CAPA

      Additional info:

      - Impacting on SD/ROSA: https://redhat-internal.slack.com/archives/CCPBZPX7U/p1717588837289489 

            rdossant Rafael Fonseca dos Santos
            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: