Skip to content

Commit 11f491c

Browse files
committed
important: add markers to existing CRDs for generation
1 parent ff31f9c commit 11f491c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+321
-46
lines changed

cloudnetwork/v1/types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ import (
2323
// +kubebuilder:object:root=true
2424
// +kubebuilder:subresource:status
2525
// +kubebuilder:resource:path=cloudprivateipconfigs,scope=Cluster
26+
// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/859
27+
// +openshift:file-pattern=001-cloudprivateipconfigMARKERS.crd.yaml
2628
// +openshift:compatibility-gen:level=1
2729
type CloudPrivateIPConfig struct {
2830
metav1.TypeMeta `json:",inline"`

config/v1/doc.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// +k8s:deepcopy-gen=package,register
22
// +k8s:defaulter-gen=TypeMeta
33
// +k8s:openapi-gen=true
4+
// +openshift:featuregated-schema-gen=true
45

56
// +kubebuilder:validation:Optional
67
// +groupName=config.openshift.io

config/v1/types_apiserver.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ import (
1414
//
1515
// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
1616
// +openshift:compatibility-gen:level=1
17+
// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/470
18+
// +openshift:file-pattern=0000_10_config-operator_01_apiserverMARKERS.crd.yaml
19+
// +kubebuilder:object:root=true
20+
// +kubebuilder:resource:path=apiservers,scope=Cluster
21+
// +kubebuilder:subresource:status
1722
type APIServer struct {
1823
metav1.TypeMeta `json:",inline"`
1924

config/v1/types_authentication.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,19 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
44

55
// +genclient
66
// +genclient:nonNamespaced
7-
// +kubebuilder:subresource:status
87
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
9-
// +openshift:validation:FeatureSetAwareXValidation:featureSet=CustomNoUpgrade;TechPreviewNoUpgrade,rule="!has(self.spec.oidcProviders) || self.spec.oidcProviders.all(p, !has(p.oidcClients) || p.oidcClients.all(specC, self.status.oidcClients.exists(statusC, statusC.componentNamespace == specC.componentNamespace && statusC.componentName == specC.componentName) || (has(oldSelf.spec.oidcProviders) && oldSelf.spec.oidcProviders.exists(oldP, oldP.name == p.name && has(oldP.oidcClients) && oldP.oidcClients.exists(oldC, oldC.componentNamespace == specC.componentNamespace && oldC.componentName == specC.componentName)))))",message="all oidcClients in the oidcProviders must match their componentName and componentNamespace to either a previously configured oidcClient or they must exist in the status.oidcClients"
8+
// +openshift:validation:FeatureGateAwareXValidation:featureGate=ExternalOIDC,rule="!has(self.spec.oidcProviders) || self.spec.oidcProviders.all(p, !has(p.oidcClients) || p.oidcClients.all(specC, self.status.oidcClients.exists(statusC, statusC.componentNamespace == specC.componentNamespace && statusC.componentName == specC.componentName) || (has(oldSelf.spec.oidcProviders) && oldSelf.spec.oidcProviders.exists(oldP, oldP.name == p.name && has(oldP.oidcClients) && oldP.oidcClients.exists(oldC, oldC.componentNamespace == specC.componentNamespace && oldC.componentName == specC.componentName)))))",message="all oidcClients in the oidcProviders must match their componentName and componentNamespace to either a previously configured oidcClient or they must exist in the status.oidcClients"
109

1110
// Authentication specifies cluster-wide settings for authentication (like OAuth and
1211
// webhook token authenticators). The canonical name of an instance is `cluster`.
1312
//
1413
// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
1514
// +openshift:compatibility-gen:level=1
15+
// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/470
16+
// +openshift:file-pattern=0000_10_config-operator_01_authentication.crdMARKERS.yaml
17+
// +kubebuilder:object:root=true
18+
// +kubebuilder:resource:path=authentications,scope=Cluster
19+
// +kubebuilder:subresource:status
1620
type Authentication struct {
1721
metav1.TypeMeta `json:",inline"`
1822

@@ -85,7 +89,7 @@ type AuthenticationSpec struct {
8589
// +listType=map
8690
// +listMapKey=name
8791
// +kubebuilder:validation:MaxItems=1
88-
// +openshift:enable:FeatureSets=CustomNoUpgrade;TechPreviewNoUpgrade
92+
// +openshift:enable:FeatureGate=ExternalOIDC
8993
OIDCProviders []OIDCProvider `json:"oidcProviders,omitempty"`
9094
}
9195

@@ -112,7 +116,7 @@ type AuthenticationStatus struct {
112116
// +listMapKey=componentNamespace
113117
// +listMapKey=componentName
114118
// +kubebuilder:validation:MaxItems=20
115-
// +openshift:enable:FeatureSets=CustomNoUpgrade;TechPreviewNoUpgrade
119+
// +openshift:enable:FeatureGate=ExternalOIDC
116120
OIDCClients []OIDCClientStatus `json:"oidcClients"`
117121
}
118122

@@ -130,8 +134,8 @@ type AuthenticationList struct {
130134
Items []Authentication `json:"items"`
131135
}
132136

133-
// +openshift:validation:FeatureSetAwareEnum:featureSet=Default,enum="";None;IntegratedOAuth
134-
// +openshift:validation:FeatureSetAwareEnum:featureSet=CustomNoUpgrade;TechPreviewNoUpgrade,enum="";None;IntegratedOAuth;OIDC
137+
// +openshift:validation:FeatureGateAwareEnum:featureGate="",enum="";None;IntegratedOAuth
138+
// +openshift:validation:FeatureGateAwareEnum:featureGate=ExternalOIDC,enum="";None;IntegratedOAuth;OIDC
135139
type AuthenticationType string
136140

137141
const (

config/v1/types_build.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ import (
1616
//
1717
// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
1818
// +openshift:compatibility-gen:level=1
19+
// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/470
20+
// +openshift:file-pattern=0000_10_openshift-controller-manager-operator_01_buildMARKERS.crd.yaml
21+
// +openshift:capability=Build
22+
// +kubebuilder:object:root=true
23+
// +kubebuilder:resource:path=builds,scope=Cluster
24+
// +kubebuilder:subresource:status
1925
type Build struct {
2026
metav1.TypeMeta `json:",inline"`
2127

config/v1/types_cluster_operator.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ import (
1515
//
1616
// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
1717
// +openshift:compatibility-gen:level=1
18+
// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/497
19+
// +openshift:file-pattern=0000_00_cluster-version-operator_01_clusteroperatorMARKERS.crd.yaml
20+
// +kubebuilder:object:root=true
21+
// +kubebuilder:resource:path=clusteroperators,scope=Cluster,shortName=co
22+
// +kubebuilder:subresource:status
23+
// +kubebuilder:printcolumn:name=Version,JSONPath=.status.versions[?(@.name=="operator")].version,type=string,description=The version the operator is at.
24+
// +kubebuilder:printcolumn:name=Available,JSONPath=.status.conditions[?(@.type=="Available")].status,type=string,description=Whether the operator is running and stable.
25+
// +kubebuilder:printcolumn:name=Progressing,JSONPath=.status.conditions[?(@.type=="Progressing")].status,type=string,description=Whether the operator is processing changes.
26+
// +kubebuilder:printcolumn:name=Degraded,JSONPath=.status.conditions[?(@.type=="Degraded")].status,type=string,description=Whether the operator is degraded.
27+
// +kubebuilder:printcolumn:name=Since,JSONPath=.status.conditions[?(@.type=="Available")].lastTransitionTime,type=date,description=The time the operator's Available status last changed.
1828
type ClusterOperator struct {
1929
metav1.TypeMeta `json:",inline"`
2030

config/v1/types_cluster_version.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,18 @@ import (
1313
//
1414
// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
1515
// +openshift:compatibility-gen:level=1
16+
// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/495
17+
// +openshift:file-pattern=0000_00_cluster-version-operator_01_clusterversionMARKERS.crd.yaml
18+
// +kubebuilder:object:root=true
19+
// +kubebuilder:subresource:status
20+
// +kubebuilder:resource:path=clusterversions,scope=Cluster
1621
// +kubebuilder:validation:XValidation:rule="has(self.spec.capabilities) && has(self.spec.capabilities.additionalEnabledCapabilities) && self.spec.capabilities.baselineCapabilitySet == 'None' && 'baremetal' in self.spec.capabilities.additionalEnabledCapabilities ? 'MachineAPI' in self.spec.capabilities.additionalEnabledCapabilities || (has(self.status) && has(self.status.capabilities) && has(self.status.capabilities.enabledCapabilities) && 'MachineAPI' in self.status.capabilities.enabledCapabilities) : true",message="the `baremetal` capability requires the `MachineAPI` capability, which is neither explicitly or implicitly enabled in this cluster, please enable the `MachineAPI` capability"
1722
// +kubebuilder:validation:XValidation:rule="has(self.spec.capabilities) && has(self.spec.capabilities.additionalEnabledCapabilities) && self.spec.capabilities.baselineCapabilitySet == 'None' && 'marketplace' in self.spec.capabilities.additionalEnabledCapabilities ? 'OperatorLifecycleManager' in self.spec.capabilities.additionalEnabledCapabilities || (has(self.status) && has(self.status.capabilities) && has(self.status.capabilities.enabledCapabilities) && 'OperatorLifecycleManager' in self.status.capabilities.enabledCapabilities) : true",message="the `marketplace` capability requires the `OperatorLifecycleManager` capability, which is neither explicitly or implicitly enabled in this cluster, please enable the `OperatorLifecycleManager` capability"
23+
// +kubebuilder:printcolumn:name=Version,JSONPath=.status.history[?(@.state=="Completed")].version,type=string
24+
// +kubebuilder:printcolumn:name=Available,JSONPath=.status.conditions[?(@.type=="Available")].status,type=string
25+
// +kubebuilder:printcolumn:name=Progressing,JSONPath=.status.conditions[?(@.type=="Progressing")].status,type=string
26+
// +kubebuilder:printcolumn:name=Since,JSONPath=.status.conditions[?(@.type=="Progressing")].lastTransitionTime,type=date
27+
// +kubebuilder:printcolumn:name=Status,JSONPath=.status.conditions[?(@.type=="Progressing")].message,type=string
1828
type ClusterVersion struct {
1929
metav1.TypeMeta `json:",inline"`
2030

@@ -100,7 +110,7 @@ type ClusterVersionSpec struct {
100110
//
101111
// A maximum of 32 signature stores may be configured.
102112
// +kubebuilder:validation:MaxItems=32
103-
// +openshift:enable:FeatureSets=CustomNoUpgrade;TechPreviewNoUpgrade
113+
// +openshift:enable:FeatureGate=SignatureStores
104114
// +listType=map
105115
// +listMapKey=url
106116
// +optional

config/v1/types_console.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ import (
1414
//
1515
// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
1616
// +openshift:compatibility-gen:level=1
17+
// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/470
18+
// +openshift:file-pattern=0000_10_config-operator_01_consoleMARKERS.crd.yaml
19+
// +kubebuilder:object:root=true
20+
// +kubebuilder:resource:path=consoles,scope=Cluster
21+
// +kubebuilder:subresource:status
1722
type Console struct {
1823
metav1.TypeMeta `json:",inline"`
1924

config/v1/types_dns.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1010
//
1111
// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
1212
// +openshift:compatibility-gen:level=1
13+
// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/470
14+
// +openshift:file-pattern=0000_10_config-operator_01_dnsMARKERS.crd.yaml
15+
// +kubebuilder:object:root=true
16+
// +kubebuilder:resource:path=dnses,scope=Cluster
17+
// +kubebuilder:subresource:status
1318
type DNS struct {
1419
metav1.TypeMeta `json:",inline"`
1520

config/v1/types_image.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1515
//
1616
// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
1717
// +openshift:compatibility-gen:level=1
18+
// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/470
19+
// +openshift:file-pattern=0000_10_config-operator_01_imageMARKERS.crd.yaml
20+
// +kubebuilder:object:root=true
21+
// +kubebuilder:resource:path=images,scope=Cluster
22+
// +kubebuilder:subresource:status
1823
type Image struct {
1924
metav1.TypeMeta `json:",inline"`
2025

0 commit comments

Comments
 (0)