Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions config/v1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&ConsoleList{},
&DNS{},
&DNSList{},
&Features{},
&FeaturesList{},
&FeatureGate{},
&FeatureGateList{},
&Image{},
&ImageList{},
&Infrastructure{},
Expand Down
28 changes: 14 additions & 14 deletions config/v1/types_features.go → config/v1/types_feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// Features holds cluster-wide information about feature gates. The canonical name is `cluster`
type Features struct {
// Feature holds cluster-wide information about feature gates. The canonical name is `cluster`
type FeatureGate struct {
metav1.TypeMeta `json:",inline"`
// Standard object's metadata.
metav1.ObjectMeta `json:"metadata,omitempty"`

// spec holds user settable values for configuration
// +required
Spec FeaturesSpec `json:"spec"`
Spec FeatureGateSpec `json:"spec"`
// status holds observed values from the cluster. They may not be overridden.
// +optional
Status FeaturesStatus `json:"status"`
Status FeatureGateStatus `json:"status"`
}

type FeatureSet string
Expand All @@ -31,42 +31,42 @@ var (
TechPreviewNoUpgrade FeatureSet = "TechPreviewNoUpgrade"
)

type FeaturesSpec struct {
type FeatureGateSpec struct {
// featureSet changes the list of features in the cluster. The default is empty. Be very careful adjusting this setting.
// Turning on or off features may cause irreversible changes in your cluster which cannot be undone.
FeatureSet FeatureSet `json:"featureSet,omitempty"`
}

type FeaturesStatus struct {
type FeatureGateStatus struct {
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

type FeaturesList struct {
type FeatureGateList struct {
metav1.TypeMeta `json:",inline"`
// Standard object's metadata.
metav1.ListMeta `json:"metadata"`
Items []Features `json:"items"`
Items []FeatureGate `json:"items"`
}

type FeatureEnabledDisabled struct {
type FeatureGateEnabledDisabled struct {
Enabled []string
Disabled []string
}

// FeatureSets Contains a map of Feature names to Enabled/Disabled Features.
// FeatureSets Contains a map of Feature names to Enabled/Disabled Feature.
//
// NOTE: The caller needs to make sure to check for the existence of the value
// using golang's existence field. A possible scenario is an upgrade where new
// FeatureSets are added and a controller has not been upgraded with a newer
// version of this file. In this upgrade scenario the map could return nil.
//
// example:
// if featureSet, ok := FeaturesSets["SomeNewFeature"]; ok { }
// if featureSet, ok := FeatureSets["SomeNewFeature"]; ok { }
//
// If you put an item in either of these lists, put your area and name on it so we can find owners.
var FeatureSets = map[FeatureSet]*FeatureEnabledDisabled{
Default: &FeatureEnabledDisabled{
var FeatureSets = map[FeatureSet]*FeatureGateEnabledDisabled{
Default: &FeatureGateEnabledDisabled{
Enabled: []string{
"ExperimentalCriticalPodAnnotation", // sig-pod, sjenning
"RotateKubeletServerCertificate", // sig-pod, sjenning
Expand All @@ -76,7 +76,7 @@ var FeatureSets = map[FeatureSet]*FeatureEnabledDisabled{
"PersistentLocalVolumes", // sig-storage, [email protected]
},
},
TechPreviewNoUpgrade: &FeatureEnabledDisabled{
TechPreviewNoUpgrade: &FeatureGateEnabledDisabled{
Enabled: []string{
"ExperimentalCriticalPodAnnotation", // sig-pod, sjenning
"RotateKubeletServerCertificate", // sig-pod, sjenning
Expand Down
88 changes: 44 additions & 44 deletions config/v1/zz_generated.deepcopy.go

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

20 changes: 10 additions & 10 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.