Skip to content

Commit 674ad74

Browse files
Merge pull request openshift#2372 from bharath-b-rh/oape-232
OAPE-232/OCPBUGS-55653: Remove GCPLabelsTags featuregate
2 parents 926605d + 8fa54b5 commit 674ad74

File tree

39 files changed

+2278
-5017
lines changed

39 files changed

+2278
-5017
lines changed

config/v1/tests/infrastructures.config.openshift.io/GCPLabelsTags.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
22
name: "Infrastructure"
33
crdName: infrastructures.config.openshift.io
4-
featureGates:
5-
- GCPLabelsTags
64
tests:
75
onCreate:
86
- name: Should be able to create a minimal Infrastructure

config/v1/types_infrastructure.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -701,8 +701,8 @@ type GCPServiceEndpoint struct {
701701
type GCPPlatformSpec struct{}
702702

703703
// GCPPlatformStatus holds the current status of the Google Cloud Platform infrastructure provider.
704-
// +openshift:validation:FeatureGateAwareXValidation:featureGate=GCPLabelsTags,rule="!has(oldSelf.resourceLabels) && !has(self.resourceLabels) || has(oldSelf.resourceLabels) && has(self.resourceLabels)",message="resourceLabels may only be configured during installation"
705-
// +openshift:validation:FeatureGateAwareXValidation:featureGate=GCPLabelsTags,rule="!has(oldSelf.resourceTags) && !has(self.resourceTags) || has(oldSelf.resourceTags) && has(self.resourceTags)",message="resourceTags may only be configured during installation"
704+
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.resourceLabels) && !has(self.resourceLabels) || has(oldSelf.resourceLabels) && has(self.resourceLabels)",message="resourceLabels may only be configured during installation"
705+
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.resourceTags) && !has(self.resourceTags) || has(oldSelf.resourceTags) && has(self.resourceTags)",message="resourceTags may only be configured during installation"
706706
type GCPPlatformStatus struct {
707707
// resourceGroupName is the Project ID for new GCP resources created for the cluster.
708708
ProjectID string `json:"projectID"`
@@ -719,7 +719,6 @@ type GCPPlatformStatus struct {
719719
// +listType=map
720720
// +listMapKey=key
721721
// +optional
722-
// +openshift:enable:FeatureGate=GCPLabelsTags
723722
ResourceLabels []GCPResourceLabel `json:"resourceLabels,omitempty"`
724723

725724
// resourceTags is a list of additional tags to apply to GCP resources created for the cluster.
@@ -730,7 +729,6 @@ type GCPPlatformStatus struct {
730729
// +listType=map
731730
// +listMapKey=key
732731
// +optional
733-
// +openshift:enable:FeatureGate=GCPLabelsTags
734732
ResourceTags []GCPResourceTag `json:"resourceTags,omitempty"`
735733

736734
// This field was introduced and removed under tech preview.

config/v1/zz_generated.featuregated-crd-manifests.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,6 @@ infrastructures.config.openshift.io:
366366
- DyanmicServiceEndpointIBMCloud
367367
- GCPClusterHostedDNS
368368
- GCPCustomAPIEndpoints
369-
- GCPLabelsTags
370369
- HighlyAvailableArbiter
371370
- HighlyAvailableArbiter+DualReplica
372371
- NutanixMultiSubnets

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/AAA_ungated.yaml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,113 @@ spec:
14881488
description: region holds the region for new GCP resources
14891489
created for the cluster.
14901490
type: string
1491+
resourceLabels:
1492+
description: |-
1493+
resourceLabels is a list of additional labels to apply to GCP resources created for the cluster.
1494+
See https://cloud.google.com/compute/docs/labeling-resources for information on labeling GCP resources.
1495+
GCP supports a maximum of 64 labels per resource. OpenShift reserves 32 labels for internal use,
1496+
allowing 32 labels for user configuration.
1497+
items:
1498+
description: GCPResourceLabel is a label to apply to GCP
1499+
resources created for the cluster.
1500+
properties:
1501+
key:
1502+
description: |-
1503+
key is the key part of the label. A label key can have a maximum of 63 characters and cannot be empty.
1504+
Label key must begin with a lowercase letter, and must contain only lowercase letters, numeric characters,
1505+
and the following special characters `_-`. Label key must not have the reserved prefixes `kubernetes-io`
1506+
and `openshift-io`.
1507+
maxLength: 63
1508+
minLength: 1
1509+
pattern: ^[a-z][0-9a-z_-]{0,62}$
1510+
type: string
1511+
x-kubernetes-validations:
1512+
- message: label keys must not start with either `openshift-io`
1513+
or `kubernetes-io`
1514+
rule: '!self.startsWith(''openshift-io'') && !self.startsWith(''kubernetes-io'')'
1515+
value:
1516+
description: |-
1517+
value is the value part of the label. A label value can have a maximum of 63 characters and cannot be empty.
1518+
Value must contain only lowercase letters, numeric characters, and the following special characters `_-`.
1519+
maxLength: 63
1520+
minLength: 1
1521+
pattern: ^[0-9a-z_-]{1,63}$
1522+
type: string
1523+
required:
1524+
- key
1525+
- value
1526+
type: object
1527+
maxItems: 32
1528+
type: array
1529+
x-kubernetes-list-map-keys:
1530+
- key
1531+
x-kubernetes-list-type: map
1532+
x-kubernetes-validations:
1533+
- message: resourceLabels are immutable and may only be configured
1534+
during installation
1535+
rule: self.all(x, x in oldSelf) && oldSelf.all(x, x in self)
1536+
resourceTags:
1537+
description: |-
1538+
resourceTags is a list of additional tags to apply to GCP resources created for the cluster.
1539+
See https://cloud.google.com/resource-manager/docs/tags/tags-overview for information on
1540+
tagging GCP resources. GCP supports a maximum of 50 tags per resource.
1541+
items:
1542+
description: GCPResourceTag is a tag to apply to GCP resources
1543+
created for the cluster.
1544+
properties:
1545+
key:
1546+
description: |-
1547+
key is the key part of the tag. A tag key can have a maximum of 63 characters and cannot be empty.
1548+
Tag key must begin and end with an alphanumeric character, and must contain only uppercase, lowercase
1549+
alphanumeric characters, and the following special characters `._-`.
1550+
maxLength: 63
1551+
minLength: 1
1552+
pattern: ^[a-zA-Z0-9]([0-9A-Za-z_.-]{0,61}[a-zA-Z0-9])?$
1553+
type: string
1554+
parentID:
1555+
description: |-
1556+
parentID is the ID of the hierarchical resource where the tags are defined,
1557+
e.g. at the Organization or the Project level. To find the Organization or Project ID refer to the following pages:
1558+
https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id,
1559+
https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects.
1560+
An OrganizationID must consist of decimal numbers, and cannot have leading zeroes.
1561+
A ProjectID must be 6 to 30 characters in length, can only contain lowercase letters, numbers,
1562+
and hyphens, and must start with a letter, and cannot end with a hyphen.
1563+
maxLength: 32
1564+
minLength: 1
1565+
pattern: (^[1-9][0-9]{0,31}$)|(^[a-z][a-z0-9-]{4,28}[a-z0-9]$)
1566+
type: string
1567+
value:
1568+
description: |-
1569+
value is the value part of the tag. A tag value can have a maximum of 63 characters and cannot be empty.
1570+
Tag value must begin and end with an alphanumeric character, and must contain only uppercase, lowercase
1571+
alphanumeric characters, and the following special characters `_-.@%=+:,*#&(){}[]` and spaces.
1572+
maxLength: 63
1573+
minLength: 1
1574+
pattern: ^[a-zA-Z0-9]([0-9A-Za-z_.@%=+:,*#&()\[\]{}\-\s]{0,61}[a-zA-Z0-9])?$
1575+
type: string
1576+
required:
1577+
- key
1578+
- parentID
1579+
- value
1580+
type: object
1581+
maxItems: 50
1582+
type: array
1583+
x-kubernetes-list-map-keys:
1584+
- key
1585+
x-kubernetes-list-type: map
1586+
x-kubernetes-validations:
1587+
- message: resourceTags are immutable and may only be configured
1588+
during installation
1589+
rule: self.all(x, x in oldSelf) && oldSelf.all(x, x in self)
14911590
type: object
1591+
x-kubernetes-validations:
1592+
- message: resourceLabels may only be configured during installation
1593+
rule: '!has(oldSelf.resourceLabels) && !has(self.resourceLabels)
1594+
|| has(oldSelf.resourceLabels) && has(self.resourceLabels)'
1595+
- message: resourceTags may only be configured during installation
1596+
rule: '!has(oldSelf.resourceTags) && !has(self.resourceTags)
1597+
|| has(oldSelf.resourceTags) && has(self.resourceTags)'
14921598
ibmcloud:
14931599
description: ibmcloud contains settings specific to the IBMCloud
14941600
infrastructure provider.

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/AWSClusterHostedDNS.yaml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,7 +1586,113 @@ spec:
15861586
description: region holds the region for new GCP resources
15871587
created for the cluster.
15881588
type: string
1589+
resourceLabels:
1590+
description: |-
1591+
resourceLabels is a list of additional labels to apply to GCP resources created for the cluster.
1592+
See https://cloud.google.com/compute/docs/labeling-resources for information on labeling GCP resources.
1593+
GCP supports a maximum of 64 labels per resource. OpenShift reserves 32 labels for internal use,
1594+
allowing 32 labels for user configuration.
1595+
items:
1596+
description: GCPResourceLabel is a label to apply to GCP
1597+
resources created for the cluster.
1598+
properties:
1599+
key:
1600+
description: |-
1601+
key is the key part of the label. A label key can have a maximum of 63 characters and cannot be empty.
1602+
Label key must begin with a lowercase letter, and must contain only lowercase letters, numeric characters,
1603+
and the following special characters `_-`. Label key must not have the reserved prefixes `kubernetes-io`
1604+
and `openshift-io`.
1605+
maxLength: 63
1606+
minLength: 1
1607+
pattern: ^[a-z][0-9a-z_-]{0,62}$
1608+
type: string
1609+
x-kubernetes-validations:
1610+
- message: label keys must not start with either `openshift-io`
1611+
or `kubernetes-io`
1612+
rule: '!self.startsWith(''openshift-io'') && !self.startsWith(''kubernetes-io'')'
1613+
value:
1614+
description: |-
1615+
value is the value part of the label. A label value can have a maximum of 63 characters and cannot be empty.
1616+
Value must contain only lowercase letters, numeric characters, and the following special characters `_-`.
1617+
maxLength: 63
1618+
minLength: 1
1619+
pattern: ^[0-9a-z_-]{1,63}$
1620+
type: string
1621+
required:
1622+
- key
1623+
- value
1624+
type: object
1625+
maxItems: 32
1626+
type: array
1627+
x-kubernetes-list-map-keys:
1628+
- key
1629+
x-kubernetes-list-type: map
1630+
x-kubernetes-validations:
1631+
- message: resourceLabels are immutable and may only be configured
1632+
during installation
1633+
rule: self.all(x, x in oldSelf) && oldSelf.all(x, x in self)
1634+
resourceTags:
1635+
description: |-
1636+
resourceTags is a list of additional tags to apply to GCP resources created for the cluster.
1637+
See https://cloud.google.com/resource-manager/docs/tags/tags-overview for information on
1638+
tagging GCP resources. GCP supports a maximum of 50 tags per resource.
1639+
items:
1640+
description: GCPResourceTag is a tag to apply to GCP resources
1641+
created for the cluster.
1642+
properties:
1643+
key:
1644+
description: |-
1645+
key is the key part of the tag. A tag key can have a maximum of 63 characters and cannot be empty.
1646+
Tag key must begin and end with an alphanumeric character, and must contain only uppercase, lowercase
1647+
alphanumeric characters, and the following special characters `._-`.
1648+
maxLength: 63
1649+
minLength: 1
1650+
pattern: ^[a-zA-Z0-9]([0-9A-Za-z_.-]{0,61}[a-zA-Z0-9])?$
1651+
type: string
1652+
parentID:
1653+
description: |-
1654+
parentID is the ID of the hierarchical resource where the tags are defined,
1655+
e.g. at the Organization or the Project level. To find the Organization or Project ID refer to the following pages:
1656+
https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id,
1657+
https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects.
1658+
An OrganizationID must consist of decimal numbers, and cannot have leading zeroes.
1659+
A ProjectID must be 6 to 30 characters in length, can only contain lowercase letters, numbers,
1660+
and hyphens, and must start with a letter, and cannot end with a hyphen.
1661+
maxLength: 32
1662+
minLength: 1
1663+
pattern: (^[1-9][0-9]{0,31}$)|(^[a-z][a-z0-9-]{4,28}[a-z0-9]$)
1664+
type: string
1665+
value:
1666+
description: |-
1667+
value is the value part of the tag. A tag value can have a maximum of 63 characters and cannot be empty.
1668+
Tag value must begin and end with an alphanumeric character, and must contain only uppercase, lowercase
1669+
alphanumeric characters, and the following special characters `_-.@%=+:,*#&(){}[]` and spaces.
1670+
maxLength: 63
1671+
minLength: 1
1672+
pattern: ^[a-zA-Z0-9]([0-9A-Za-z_.@%=+:,*#&()\[\]{}\-\s]{0,61}[a-zA-Z0-9])?$
1673+
type: string
1674+
required:
1675+
- key
1676+
- parentID
1677+
- value
1678+
type: object
1679+
maxItems: 50
1680+
type: array
1681+
x-kubernetes-list-map-keys:
1682+
- key
1683+
x-kubernetes-list-type: map
1684+
x-kubernetes-validations:
1685+
- message: resourceTags are immutable and may only be configured
1686+
during installation
1687+
rule: self.all(x, x in oldSelf) && oldSelf.all(x, x in self)
15891688
type: object
1689+
x-kubernetes-validations:
1690+
- message: resourceLabels may only be configured during installation
1691+
rule: '!has(oldSelf.resourceLabels) && !has(self.resourceLabels)
1692+
|| has(oldSelf.resourceLabels) && has(self.resourceLabels)'
1693+
- message: resourceTags may only be configured during installation
1694+
rule: '!has(oldSelf.resourceTags) && !has(self.resourceTags)
1695+
|| has(oldSelf.resourceTags) && has(self.resourceTags)'
15901696
ibmcloud:
15911697
description: ibmcloud contains settings specific to the IBMCloud
15921698
infrastructure provider.

0 commit comments

Comments
 (0)