Skip to content

Commit 122eed1

Browse files
Merge pull request openshift#8766 from bharath-b-rh/cfe-920
CFE-920: Update GCP userLabels and userTags configs description
2 parents 16cc5f3 + 20cfc5a commit 122eed1

File tree

7 files changed

+28
-29
lines changed

7 files changed

+28
-29
lines changed

data/data/install.openshift.io_installconfigs.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3514,9 +3514,8 @@ spec:
35143514
description: userLabels has additional keys and values that the
35153515
installer will add as labels to all resources that it creates
35163516
on GCP. Resources created by the cluster itself may not include
3517-
these labels. This is a TechPreview feature and requires setting
3518-
CustomNoUpgrade featureSet with GCPLabelsTags featureGate enabled
3519-
or TechPreviewNoUpgrade featureSet to configure labels.
3517+
these labels. GCPLabelsTags featureGate is defined for managing
3518+
this feature and is enabled by default.
35203519
items:
35213520
description: UserLabel is a label to apply to GCP resources
35223521
created for the cluster.
@@ -3553,10 +3552,8 @@ spec:
35533552
installer will add as tags to all resources that it creates
35543553
on GCP. Resources created by the cluster itself may not include
35553554
these tags. Tag key and tag value should be the shortnames of
3556-
the tag key and tag value resource. This is a TechPreview feature
3557-
and requires setting CustomNoUpgrade featureSet with GCPLabelsTags
3558-
featureGate enabled or TechPreviewNoUpgrade featureSet to configure
3559-
tags.
3555+
the tag key and tag value resource. GCPLabelsTags featureGate
3556+
is defined for managing this feature and is enabled by default.
35603557
items:
35613558
description: UserTag is a tag to apply to GCP resources created
35623559
for the cluster.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ require (
7070
github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.3.3-0.20240416171357-98239ba02cb2
7171
github.com/nutanix-cloud-native/prism-go-client v0.3.4
7272
github.com/onsi/gomega v1.33.1
73-
github.com/openshift/api v0.0.0-20240808203820-e69593239e49
73+
github.com/openshift/api v0.0.0-20240809035623-d6942fb7294e
7474
github.com/openshift/assisted-image-service v0.0.0-20240607085136-02df2e56dde6
7575
github.com/openshift/assisted-service/api v0.0.0
7676
github.com/openshift/assisted-service/client v0.0.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,8 +764,8 @@ github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQ
764764
github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
765765
github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk=
766766
github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
767-
github.com/openshift/api v0.0.0-20240808203820-e69593239e49 h1:sw+VD/623xdBnqm1r5DUfch1R7lm7uE5wiYkJt6ioRI=
768-
github.com/openshift/api v0.0.0-20240808203820-e69593239e49/go.mod h1:OOh6Qopf21pSzqNVCB5gomomBXb8o5sGKZxG2KNpaXM=
767+
github.com/openshift/api v0.0.0-20240809035623-d6942fb7294e h1:gEw+Gxu4r3g9WAYOIclpQDXP2UM7xl4xGPjoHDnBriA=
768+
github.com/openshift/api v0.0.0-20240809035623-d6942fb7294e/go.mod h1:OOh6Qopf21pSzqNVCB5gomomBXb8o5sGKZxG2KNpaXM=
769769
github.com/openshift/assisted-image-service v0.0.0-20240607085136-02df2e56dde6 h1:U6ve+dnHlHhAELoxX+rdFOHVhoaYl0l9qtxwYtsO6C0=
770770
github.com/openshift/assisted-image-service v0.0.0-20240607085136-02df2e56dde6/go.mod h1:o2H5VwQhUD8P6XsK6dRmKpCCJqVvv12KJQZBXmcCXCU=
771771
github.com/openshift/assisted-service/api v0.0.0-20230831114549-1922eda29cf8 h1:+fZLKbycDo4JeLwPGVSAgf2XPaJGLM341l9ZfrrlxG0=

pkg/types/gcp/platform.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,15 @@ type Platform struct {
5252

5353
// userLabels has additional keys and values that the installer will add as
5454
// labels to all resources that it creates on GCP. Resources created by the
55-
// cluster itself may not include these labels. This is a TechPreview feature
56-
// and requires setting CustomNoUpgrade featureSet with GCPLabelsTags featureGate
57-
// enabled or TechPreviewNoUpgrade featureSet to configure labels.
55+
// cluster itself may not include these labels. GCPLabelsTags featureGate is
56+
// defined for managing this feature and is enabled by default.
5857
UserLabels []UserLabel `json:"userLabels,omitempty"`
5958

6059
// userTags has additional keys and values that the installer will add as
6160
// tags to all resources that it creates on GCP. Resources created by the
6261
// cluster itself may not include these tags. Tag key and tag value should
63-
// be the shortnames of the tag key and tag value resource. This is a TechPreview
64-
// feature and requires setting CustomNoUpgrade featureSet with GCPLabelsTags
65-
// featureGate enabled or TechPreviewNoUpgrade featureSet to configure tags.
62+
// be the shortnames of the tag key and tag value resource. GCPLabelsTags featureGate
63+
// is defined for managing this feature and is enabled by default.
6664
UserTags []UserTag `json:"userTags,omitempty"`
6765

6866
// UserProvisionedDNS indicates if the customer is providing their own DNS solution in place of the default

pkg/types/validation/featuregate_test.go

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,54 +18,58 @@ func TestFeatureGates(t *testing.T) {
1818
expected string
1919
}{
2020
{
21-
name: "GCP UserTags is allowed with Feature Gates enabled",
21+
name: "GCP UserTags is allowed with default enabled Feature Gates",
2222
installConfig: func() *types.InstallConfig {
2323
c := validInstallConfig()
24-
c.FeatureSet = v1.TechPreviewNoUpgrade
24+
c.FeatureSet = v1.Default
2525
c.GCP = validGCPPlatform()
2626
c.GCP.UserTags = []gcp.UserTag{{ParentID: "a", Key: "b", Value: "c"}}
2727
return c
2828
}(),
2929
},
3030
{
31-
name: "GCP UserTags is not allowed without Feature Gates",
31+
name: "GCP UserTags is not allowed when GCPLabelsTags Feature Gate is disabled",
3232
installConfig: func() *types.InstallConfig {
3333
c := validInstallConfig()
34+
c.FeatureSet = v1.CustomNoUpgrade
35+
c.FeatureGates = []string{"GCPLabelsTags=false"}
3436
c.GCP = validGCPPlatform()
3537
c.GCP.UserTags = []gcp.UserTag{{ParentID: "a", Key: "b", Value: "c"}}
3638
return c
3739
}(),
3840
expected: `^platform.gcp.userTags: Forbidden: this field is protected by the GCPLabelsTags feature gate which must be enabled through either the TechPreviewNoUpgrade or CustomNoUpgrade feature set$`,
3941
},
4042
{
41-
name: "GCP UserLabels is allowed with Feature Gates enabled",
43+
name: "GCP UserLabels is allowed with default enabled Feature Gates",
4244
installConfig: func() *types.InstallConfig {
4345
c := validInstallConfig()
44-
c.FeatureSet = v1.TechPreviewNoUpgrade
46+
c.FeatureSet = v1.Default
4547
c.GCP = validGCPPlatform()
4648
c.GCP.UserLabels = []gcp.UserLabel{{Key: "a", Value: "b"}}
4749
return c
4850
}(),
4951
},
5052
{
51-
name: "GCP UserProvisionedDNS is not allowed without Feature Gates",
53+
name: "GCP UserLabels is not allowed when GCPLabelsTags Feature Gate is disabled",
5254
installConfig: func() *types.InstallConfig {
5355
c := validInstallConfig()
56+
c.FeatureSet = v1.CustomNoUpgrade
57+
c.FeatureGates = []string{"GCPLabelsTags=false"}
5458
c.GCP = validGCPPlatform()
55-
c.GCP.UserProvisionedDNS = gcp.UserProvisionedDNSEnabled
59+
c.GCP.UserLabels = []gcp.UserLabel{{Key: "a", Value: "b"}}
5660
return c
5761
}(),
58-
expected: `^platform.gcp.userProvisionedDNS: Forbidden: this field is protected by the GCPClusterHostedDNS feature gate which must be enabled through either the TechPreviewNoUpgrade or CustomNoUpgrade feature set$`,
62+
expected: `^platform.gcp.userLabels: Forbidden: this field is protected by the GCPLabelsTags feature gate which must be enabled through either the TechPreviewNoUpgrade or CustomNoUpgrade feature set$`,
5963
},
6064
{
61-
name: "GCP UserLabels is not allowed without Feature Gates",
65+
name: "GCP UserProvisionedDNS is not allowed without Feature Gates",
6266
installConfig: func() *types.InstallConfig {
6367
c := validInstallConfig()
6468
c.GCP = validGCPPlatform()
65-
c.GCP.UserLabels = []gcp.UserLabel{{Key: "a", Value: "b"}}
69+
c.GCP.UserProvisionedDNS = gcp.UserProvisionedDNSEnabled
6670
return c
6771
}(),
68-
expected: `^platform.gcp.userLabels: Forbidden: this field is protected by the GCPLabelsTags feature gate which must be enabled through either the TechPreviewNoUpgrade or CustomNoUpgrade feature set$`,
72+
expected: `^platform.gcp.userProvisionedDNS: Forbidden: this field is protected by the GCPClusterHostedDNS feature gate which must be enabled through either the TechPreviewNoUpgrade or CustomNoUpgrade feature set$`,
6973
},
7074
{
7175
name: "vSphere hosts is allowed with Feature Gates enabled",

vendor/github.com/openshift/api/features/features.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@ github.com/opencontainers/image-spec/specs-go/v1
10361036
# github.com/opencontainers/runtime-spec v1.2.0
10371037
## explicit
10381038
github.com/opencontainers/runtime-spec/specs-go
1039-
# github.com/openshift/api v0.0.0-20240808203820-e69593239e49
1039+
# github.com/openshift/api v0.0.0-20240809035623-d6942fb7294e
10401040
## explicit; go 1.22.0
10411041
github.com/openshift/api/annotations
10421042
github.com/openshift/api/config/v1

0 commit comments

Comments
 (0)