Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,33 @@ spec:
resourceGroupName:
description: resourceGroupName is the Resource Group for new Azure resources created for the cluster.
type: string
resourceTags:
default: Unknown
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. Due to limitations on Automation, Content Delivery Network, DNS Azure resources, a maximum of 15 tags may be applied. OpenShift reserves 5 tags for internal use, allowing 10 tags for user configuration.
items:
description: AzureResourceTag is a tag to apply to Azure resources created for the cluster.
properties:
key:
description: key is the key part of the tag. A tag key can have a maximum of 128 characters and cannot be empty. Key must begin with a letter, end with a letter, number or underscore, and must contain only alphanumeric characters and the following special characters `_ . -`.
maxLength: 128
minLength: 1
pattern: ^[a-zA-Z]([0-9A-Za-z_.-]*[0-9A-Za-z_])?$
type: string
value:
description: 'value is the value part of the tag. A tag value can have a maximum of 256 characters and cannot be empty. Value must contain only alphanumeric characters and the following special characters `_ + , - . / : ; < = > ? @`.'
maxLength: 256
minLength: 1
pattern: ^[0-9A-Za-z_.=+-@]+$
type: string
required:
- key
- value
type: object
maxItems: 10
type: array
x-kubernetes-validations:
- message: resourceTags once configured cannot be modified
rule: oldSelf == 'Unknown' || self == oldSelf
type: object
baremetal:
description: BareMetal contains settings specific to the BareMetal platform.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,33 @@ spec:
resourceGroupName:
description: resourceGroupName is the Resource Group for new Azure resources created for the cluster.
type: string
resourceTags:
default: Unknown
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. Due to limitations on Automation, Content Delivery Network, DNS Azure resources, a maximum of 15 tags may be applied. OpenShift reserves 5 tags for internal use, allowing 10 tags for user configuration.
items:
description: AzureResourceTag is a tag to apply to Azure resources created for the cluster.
properties:
key:
description: key is the key part of the tag. A tag key can have a maximum of 128 characters and cannot be empty. Key must begin with a letter, end with a letter, number or underscore, and must contain only alphanumeric characters and the following special characters `_ . -`.
maxLength: 128
minLength: 1
pattern: ^[a-zA-Z]([0-9A-Za-z_.-]*[0-9A-Za-z_])?$
type: string
value:
description: 'value is the value part of the tag. A tag value can have a maximum of 256 characters and cannot be empty. Value must contain only alphanumeric characters and the following special characters `_ + , - . / : ; < = > ? @`.'
maxLength: 256
minLength: 1
pattern: ^[0-9A-Za-z_.=+-@]+$
type: string
required:
- key
- value
type: object
maxItems: 10
type: array
x-kubernetes-validations:
- message: resourceTags once configured cannot be modified
rule: oldSelf == 'Unknown' || self == oldSelf
type: object
baremetal:
description: BareMetal contains settings specific to the BareMetal platform.
Expand Down
32 changes: 32 additions & 0 deletions config/v1/types_infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,38 @@ type AzurePlatformStatus struct {
// armEndpoint specifies a URL to use for resource management in non-soverign clouds such as Azure Stack.
// +optional
ARMEndpoint string `json:"armEndpoint,omitempty"`

// 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.
// Due to limitations on Automation, Content Delivery Network, DNS Azure resources, a maximum of 15 tags
// may be applied. OpenShift reserves 5 tags for internal use, allowing 10 tags for user configuration.
// +kubebuilder:validation:MaxItems=10
// +kubebuilder:default:="Unknown"
// +default="Unknown"
// +kubebuilder:validation:XValidation:rule="oldSelf == 'Unknown' || self == oldSelf",message="resourceTags once configured cannot be modified"
// +optional
ResourceTags []AzureResourceTag `json:"resourceTags,omitempty"`
}

// AzureResourceTag is a tag to apply to Azure resources created for the cluster.
type AzureResourceTag struct {
// key is the key part of the tag. A tag key can have a maximum of 128 characters and cannot be empty. Key
// must begin with a letter, end with a letter, number or underscore, and must contain only alphanumeric
// characters and the following special characters `_ . -`.
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=128
// +kubebuilder:validation:Pattern=`^[a-zA-Z]([0-9A-Za-z_.-]*[0-9A-Za-z_])?$`
// +required
Comment thread
bharath-b-rh marked this conversation as resolved.
Outdated
Key string `json:"key"`
// value is the value part of the tag. A tag value can have a maximum of 256 characters and cannot be empty. Value
// must contain only alphanumeric characters and the following special characters `_ + , - . / : ; < = > ? @`.
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=256
// +kubebuilder:validation:Pattern=`^[0-9A-Za-z_.=+-@]+$`
// +required
Comment thread
bharath-b-rh marked this conversation as resolved.
Outdated
Value string `json:"value"`
}

// AzureCloudEnvironment is the name of the Azure cloud environment
Expand Down
23 changes: 22 additions & 1 deletion config/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions config/v1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions openapi/generated_openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -4543,6 +4543,35 @@
"description": "resourceGroupName is the Resource Group for new Azure resources created for the cluster.",
"type": "string",
"default": ""
},
"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. Due to limitations on Automation, Content Delivery Network, DNS Azure resources, a maximum of 15 tags may be applied. OpenShift reserves 5 tags for internal use, allowing 10 tags for user configuration.",
"type": "array",
"default": "Unknown",
"items": {
"default": {},
"$ref": "#/definitions/com.github.openshift.api.config.v1.AzureResourceTag"
}
}
}
},
"com.github.openshift.api.config.v1.AzureResourceTag": {
"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 part of the tag. A tag key can have a maximum of 128 characters and cannot be empty. Key must begin with a letter, end with a letter, number or underscore, and must contain only alphanumeric characters and the following special characters `_ . -`.",
"type": "string",
"default": ""
},
"value": {
"description": "value is the value part of the tag. A tag value can have a maximum of 256 characters and cannot be empty. Value must contain only alphanumeric characters and the following special characters `_ + , - . / : ; < = > ? @`.",
"type": "string",
"default": ""
}
}
},
Expand Down