Uploaded image for project: 'OpenShift CFE'
  1. OpenShift CFE
  2. CFE-685

Update Infrastructure CRD to support gcp labels in status

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • 5
    • False
    • None
    • False
    • OCPSTRAT-169 - [Tech Preview] Apply user defined tags to all resources created by OpenShift (GCP)
    • 0

      Enhancement proposed for GCP labels support in OCP, requires Infrastructure CRD to be updated to include gcp userLabels in the status field, so that any new gcp resource created by an in-cluster operator can refer the field for the user defined list of labels.

      Below is the snippet of change required in the CRD

      apiVersion: apiextensions.k8s.io/v1
      kind: CustomResourceDefinition
      metadata: 
        name: infrastructures.config.openshift.io
      spec: 
        versions: 
        - name: v1
          schema: 
            openAPIV3Schema: 
              properties: 
                status: 
                  properties: 
                    platformStatus: 
                      properties: 
                        gcp: 
                          properties: 
                            resourceLabels: 
                              description: resourceLabels is a list of additional labels to apply to GCP resources created for the cluster. See https://cloud.google.com/compute/docs/labeling-resources for information on labeling GCP resources. GCP supports a maximum of 64 labels per resource. OpenShift reserves 32 labels for its internal use, and allows 32 labels for user configuration.
                              type: array
                              maxItems: 32
                              items: 
                                description: GCPResourceLabels is the labels to apply to GCP resources created for the cluster.
                                type: object
                                required: 
                                  - key
                                  - value
                                properties: 
                                  key: 
                                    description: key is the name of the label
                                    type: string
                                    maxLength: 63
                                    minLength: 1
                                    pattern: ^[a-z][0-9a-z_-]+$
                                  value: 
                                    description: value is the value of the label.
                                    type: string
                                    maxLength: 63
                                    minLength: 1
                                    pattern: ^[0-9a-z_-]+$
      

      This change is required for testing the changes of the feature, and should ideally get merged first.

      Acceptance Criteria

      • Code linting, validation and best practices adhered to
      • Infrastructure CRD has the new field resourceLabels in platformStatus.status.gcp
      • Fields descriptions

            bhb@redhat.com Bharath B
            bhb@redhat.com Bharath B
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 4 hours
                1d 4h