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

Update Infrastructure CRD to support azure tags in status

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • Product / Portfolio Work
    • 5
    • False
    • Hide

      None

      Show
      None
    • False
    • 5
    • CFE Sprint 224, CFE Sprint 231

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

      Below is the snippet of change required in the CRD

      apiVersion: apiextensions.k8s.io/v1
      kind: CustomResourceDefinition
      metadata: 
        name: infrastructures.config.openshift.io
      status: 
        versions: 
        - name: v1
          schema: 
            openAPIV3Schema: 
              properties: 
                status: 
                  properties: 
                    platformStatus: 
                      properties: 
                        azure: 
                          properties: 
                            resourceTags: 
                              description: resourceTags is a list of additional tags to apply to Azure resources created for the cluster. See [https://docs.microsoft.com/en-us/rest/api/resources/tags] for information on tagging Azure resources. Azure supports a maximum of 50 tags per resource except for few, which is limited to 15. OpenShift reserves 5 tags for its internal use, and allows 10 tags for user configuration.
                              type: array
                              maxItems: 10
                              items: 
                                description: AzureResourceTag is a tag to apply to Azure resources created for the cluster.
                                type: object
                                required: 
                                  - key
                                  - value
                                properties: 
                                  key: 
                                    description: key is the key of the tag
                                    type: string
                                    maxLength: 128
                                    minLength: 1
                                    pattern: ^[a-zA-Z][0-9A-Za-z_.=+-@]+$
                                  value: 
                                    description: value is the value of the tag.
                                    type: string
                                    maxLength: 256
                                    minLength: 1
                                    pattern: ^[0-9A-Za-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 resourceTags in platformStatus.status.azure
      • Fields descriptions

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

                Created:
                Updated:
                Resolved: