Skip to content
Closed
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{},
&Feature{},
&FeatureList{},
&Image{},
&ImageList{},
&Infrastructure{},
Expand Down
20 changes: 10 additions & 10 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 Feature 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 FeatureSpec `json:"spec"`
// status holds observed values from the cluster. They may not be overridden.
// +optional
Status FeaturesStatus `json:"status"`
Status FeatureStatus `json:"status"`
}

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

type FeaturesSpec struct {
type FeatureSpec 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 FeatureStatus struct {
}

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

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

type FeatureEnabledDisabled 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 { }
//
var FeatureSets = map[FeatureSet]*FeatureEnabledDisabled{
Default: &FeatureEnabledDisabled{
Expand Down
84 changes: 42 additions & 42 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.