diff --git a/Gopkg.lock b/Gopkg.lock index 270bc4fdf9d..9c7aae6acad 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -374,18 +374,18 @@ [[projects]] branch = "master" - digest = "1:6e6aad4c378d1fd14b3b686d59c06c9d82b0f8c2c4a284ee39ed075f41e97397" + digest = "1:539aa19afe174b7891601913c55ddb83039c9ed5e2e511d562fa707e0d528046" name = "github.com/openshift/api" packages = [ "config/v1", "route/v1", ] pruneopts = "NUT" - revision = "600a5519d1ec56e02c20f42b43888db560bdcb7e" + revision = "ad6339a9e4ce20fffe56b91dc9c9ee7a4d04ebd7" [[projects]] branch = "master" - digest = "1:add2f77f1d84edeaa1ca8c7d7d5b7ecf87e48ad979aa478e71c3277e142d6484" + digest = "1:20b3ab7f151b642ff806ffe312834d14017b838663580312d1ccb3e10b4dffcc" name = "github.com/openshift/client-go" packages = [ "config/clientset/versioned", @@ -396,7 +396,7 @@ "route/clientset/versioned/typed/route/v1", ] pruneopts = "NUT" - revision = "2d89985ca24a8307e4b5db2574a62d3e6c2444b4" + revision = "8ae2a9c33ba2a3d2ed5dc13d536ca935fc9625b9" [[projects]] branch = "master" diff --git a/pkg/asset/manifests/cloudproviderconfig.go b/pkg/asset/manifests/cloudproviderconfig.go new file mode 100644 index 00000000000..b50b90c61c6 --- /dev/null +++ b/pkg/asset/manifests/cloudproviderconfig.go @@ -0,0 +1,116 @@ +package manifests + +import ( + "path/filepath" + + "github.com/ghodss/yaml" + ospclientconfig "github.com/gophercloud/utils/openstack/clientconfig" + "github.com/pkg/errors" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/openshift/installer/pkg/asset" + "github.com/openshift/installer/pkg/asset/installconfig" + osmachine "github.com/openshift/installer/pkg/asset/machines/openstack" + awstypes "github.com/openshift/installer/pkg/types/aws" + libvirttypes "github.com/openshift/installer/pkg/types/libvirt" + nonetypes "github.com/openshift/installer/pkg/types/none" + openstacktypes "github.com/openshift/installer/pkg/types/openstack" + vspheretypes "github.com/openshift/installer/pkg/types/vsphere" +) + +var ( + cloudProviderConfigFileName = filepath.Join(manifestDir, "cloud-provider-config.yaml") +) + +const ( + cloudProviderConfigDataKey = "config" +) + +// CloudProviderConfig generates the cloud-provider-config.yaml files. +type CloudProviderConfig struct { + ConfigMap *corev1.ConfigMap + File *asset.File +} + +var _ asset.WritableAsset = (*CloudProviderConfig)(nil) + +// Name returns a human friendly name for the asset. +func (*CloudProviderConfig) Name() string { + return "Cloud Provider Config" +} + +// Dependencies returns all of the dependencies directly needed to generate +// the asset. +func (*CloudProviderConfig) Dependencies() []asset.Asset { + return []asset.Asset{ + &installconfig.InstallConfig{}, + // PlatformCredsCheck just checks the creds (and asks, if needed) + // We do not actually use it in this asset directly, hence + // it is put in the dependencies but not fetched in Generate + &installconfig.PlatformCredsCheck{}, + } +} + +// Generate generates the CloudProviderConfig. +func (cpc *CloudProviderConfig) Generate(dependencies asset.Parents) error { + installConfig := &installconfig.InstallConfig{} + dependencies.Get(installConfig) + + cm := &corev1.ConfigMap{ + TypeMeta: metav1.TypeMeta{ + APIVersion: corev1.SchemeGroupVersion.String(), + Kind: "ConfigMap", + }, + ObjectMeta: metav1.ObjectMeta{ + Namespace: "openshift-config", + Name: "cloud-provider-config", + }, + Data: map[string]string{}, + } + + switch installConfig.Config.Platform.Name() { + case awstypes.Name, libvirttypes.Name, vspheretypes.Name, nonetypes.Name: + return nil + case openstacktypes.Name: + opts := &ospclientconfig.ClientOpts{} + opts.Cloud = installConfig.Config.Platform.OpenStack.Cloud + cloud, err := ospclientconfig.GetCloudFromYAML(opts) + if err != nil { + return errors.Wrap(err, "failed to get cloud config for openstack") + } + clouds := make(map[string]map[string]*ospclientconfig.Cloud) + clouds["clouds"] = map[string]*ospclientconfig.Cloud{ + osmachine.CloudName: cloud, + } + marshalled, err := yaml.Marshal(clouds) + if err != nil { + return err + } + cm.Data[cloudProviderConfigDataKey] = string(marshalled) + default: + return errors.New("invalid Platform") + } + + cmData, err := yaml.Marshal(cm) + if err != nil { + return errors.Wrapf(err, "failed to create %s manifest", cpc.Name()) + } + cpc.ConfigMap = cm + cpc.File = &asset.File{ + Filename: cloudProviderConfigFileName, + Data: cmData, + } + return nil +} + +// Files returns the files generated by the asset. +func (cpc *CloudProviderConfig) Files() []*asset.File { + return []*asset.File{cpc.File} +} + +// Load loads the already-rendered files back from disk. +func (cpc *CloudProviderConfig) Load(f asset.FileFetcher) (bool, error) { + return false, nil +} diff --git a/pkg/asset/manifests/infrastructure.go b/pkg/asset/manifests/infrastructure.go index f045b3f2a4d..3e31f405859 100644 --- a/pkg/asset/manifests/infrastructure.go +++ b/pkg/asset/manifests/infrastructure.go @@ -40,13 +40,15 @@ func (*Infrastructure) Name() string { func (*Infrastructure) Dependencies() []asset.Asset { return []asset.Asset{ &installconfig.InstallConfig{}, + &CloudProviderConfig{}, } } // Generate generates the Infrastructure config and its CRD. func (i *Infrastructure) Generate(dependencies asset.Parents) error { installConfig := &installconfig.InstallConfig{} - dependencies.Get(installConfig) + cloudproviderconfig := &CloudProviderConfig{} + dependencies.Get(installConfig, cloudproviderconfig) var platform configv1.PlatformType switch installConfig.Config.Platform.Name() { @@ -80,18 +82,20 @@ func (i *Infrastructure) Generate(dependencies asset.Parents) error { }, } + if cloudproviderconfig.ConfigMap != nil { + // set the configmap reference. + config.Spec.CloudConfig = configv1.ConfigMapFileReference{Name: cloudproviderconfig.ConfigMap.Name, Key: cloudProviderConfigDataKey} + i.FileList = append(i.FileList, cloudproviderconfig.File) + } + configData, err := yaml.Marshal(config) if err != nil { return errors.Wrapf(err, "failed to marshal config: %#v", config) } - - i.FileList = []*asset.File{ - { - Filename: infraCfgFilename, - Data: configData, - }, - } - + i.FileList = append(i.FileList, &asset.File{ + Filename: infraCfgFilename, + Data: configData, + }) return nil } diff --git a/pkg/asset/manifests/operators.go b/pkg/asset/manifests/operators.go index 46315acb385..0176d9baa34 100644 --- a/pkg/asset/manifests/operators.go +++ b/pkg/asset/manifests/operators.go @@ -166,27 +166,26 @@ func (m *Manifests) generateBootKubeManifests(dependencies asset.Parents) []*ass } templateData := &bootkubeTemplateData{ - Base64encodeCloudProviderConfig: "", // FIXME - CVOClusterID: clusterID.UUID, - EtcdCaBundle: base64.StdEncoding.EncodeToString(etcdCABundle.Cert()), - EtcdCaCert: string(etcdCA.Cert()), - EtcdClientCaCert: base64.StdEncoding.EncodeToString(etcdCA.Cert()), - EtcdClientCaKey: base64.StdEncoding.EncodeToString(etcdCA.Key()), - EtcdClientCert: base64.StdEncoding.EncodeToString(etcdClientCertKey.Cert()), - EtcdClientKey: base64.StdEncoding.EncodeToString(etcdClientCertKey.Key()), - EtcdEndpointDNSSuffix: installConfig.Config.ClusterDomain(), - EtcdEndpointHostnames: etcdEndpointHostnames, - EtcdMetricsCaCert: string(etcdMetricsCABundle.Cert()), - EtcdMetricsClientCert: base64.StdEncoding.EncodeToString(etcdMetricsSignerClientCertKey.Cert()), - EtcdMetricsClientKey: base64.StdEncoding.EncodeToString(etcdMetricsSignerClientCertKey.Key()), - EtcdSignerCert: base64.StdEncoding.EncodeToString(etcdSignerCertKey.Cert()), - EtcdSignerClientCert: base64.StdEncoding.EncodeToString(etcdSignerClientCertKey.Cert()), - EtcdSignerClientKey: base64.StdEncoding.EncodeToString(etcdSignerClientCertKey.Key()), - EtcdSignerKey: base64.StdEncoding.EncodeToString(etcdSignerCertKey.Key()), - McsTLSCert: base64.StdEncoding.EncodeToString(mcsCertKey.Cert()), - McsTLSKey: base64.StdEncoding.EncodeToString(mcsCertKey.Key()), - PullSecretBase64: base64.StdEncoding.EncodeToString([]byte(installConfig.Config.PullSecret)), - RootCaCert: string(rootCA.Cert()), + CVOClusterID: clusterID.UUID, + EtcdCaBundle: base64.StdEncoding.EncodeToString(etcdCABundle.Cert()), + EtcdCaCert: string(etcdCA.Cert()), + EtcdClientCaCert: base64.StdEncoding.EncodeToString(etcdCA.Cert()), + EtcdClientCaKey: base64.StdEncoding.EncodeToString(etcdCA.Key()), + EtcdClientCert: base64.StdEncoding.EncodeToString(etcdClientCertKey.Cert()), + EtcdClientKey: base64.StdEncoding.EncodeToString(etcdClientCertKey.Key()), + EtcdEndpointDNSSuffix: installConfig.Config.ClusterDomain(), + EtcdEndpointHostnames: etcdEndpointHostnames, + EtcdMetricsCaCert: string(etcdMetricsCABundle.Cert()), + EtcdMetricsClientCert: base64.StdEncoding.EncodeToString(etcdMetricsSignerClientCertKey.Cert()), + EtcdMetricsClientKey: base64.StdEncoding.EncodeToString(etcdMetricsSignerClientCertKey.Key()), + EtcdSignerCert: base64.StdEncoding.EncodeToString(etcdSignerCertKey.Cert()), + EtcdSignerClientCert: base64.StdEncoding.EncodeToString(etcdSignerClientCertKey.Cert()), + EtcdSignerClientKey: base64.StdEncoding.EncodeToString(etcdSignerClientCertKey.Key()), + EtcdSignerKey: base64.StdEncoding.EncodeToString(etcdSignerCertKey.Key()), + McsTLSCert: base64.StdEncoding.EncodeToString(mcsCertKey.Cert()), + McsTLSKey: base64.StdEncoding.EncodeToString(mcsCertKey.Key()), + PullSecretBase64: base64.StdEncoding.EncodeToString([]byte(installConfig.Config.PullSecret)), + RootCaCert: string(rootCA.Cert()), } files := []*asset.File{} diff --git a/pkg/asset/manifests/template.go b/pkg/asset/manifests/template.go index c63e4d6bbfe..0a58b39e8a9 100644 --- a/pkg/asset/manifests/template.go +++ b/pkg/asset/manifests/template.go @@ -17,28 +17,27 @@ type cloudCredsSecretData struct { } type bootkubeTemplateData struct { - Base64encodeCloudProviderConfig string - CVOClusterID string - EtcdCaBundle string - EtcdCaCert string - EtcdClientCaCert string - EtcdClientCaKey string - EtcdClientCert string - EtcdClientKey string - EtcdEndpointDNSSuffix string - EtcdEndpointHostnames []string - EtcdMetricsCaCert string - EtcdMetricsClientCert string - EtcdMetricsClientKey string - EtcdSignerCert string - EtcdSignerClientCert string - EtcdSignerClientKey string - EtcdSignerKey string - McsTLSCert string - McsTLSKey string - PullSecretBase64 string - RootCaCert string - WorkerIgnConfig string + CVOClusterID string + EtcdCaBundle string + EtcdCaCert string + EtcdClientCaCert string + EtcdClientCaKey string + EtcdClientCert string + EtcdClientKey string + EtcdEndpointDNSSuffix string + EtcdEndpointHostnames []string + EtcdMetricsCaCert string + EtcdMetricsClientCert string + EtcdMetricsClientKey string + EtcdSignerCert string + EtcdSignerClientCert string + EtcdSignerClientKey string + EtcdSignerKey string + McsTLSCert string + McsTLSKey string + PullSecretBase64 string + RootCaCert string + WorkerIgnConfig string } type openshiftTemplateData struct { diff --git a/vendor/github.com/openshift/api/config/v1/register.go b/vendor/github.com/openshift/api/config/v1/register.go index e096d9e3134..66c342569aa 100644 --- a/vendor/github.com/openshift/api/config/v1/register.go +++ b/vendor/github.com/openshift/api/config/v1/register.go @@ -44,8 +44,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ConsoleList{}, &DNS{}, &DNSList{}, - &Features{}, - &FeaturesList{}, + &FeatureGate{}, + &FeatureGateList{}, &Image{}, &ImageList{}, &Infrastructure{}, diff --git a/vendor/github.com/openshift/api/config/v1/types.go b/vendor/github.com/openshift/api/config/v1/types.go index 13d008d420d..7cca0947100 100644 --- a/vendor/github.com/openshift/api/config/v1/types.go +++ b/vendor/github.com/openshift/api/config/v1/types.go @@ -254,9 +254,6 @@ type GenericAPIServerConfig struct { // admissionConfig holds information about how to configure admission. AdmissionConfig AdmissionConfig `json:"admission"` - // TODO remove this. We need a cut-over or we'll have a gap. - AdmissionPluginConfig map[string]AdmissionPluginConfig `json:"admissionPluginConfig,omitempty"` - KubeClientConfig KubeClientConfig `json:"kubeClientConfig"` } diff --git a/vendor/github.com/openshift/api/config/v1/types_console.go b/vendor/github.com/openshift/api/config/v1/types_console.go index b1dea9cdf44..c8b5b482f50 100644 --- a/vendor/github.com/openshift/api/config/v1/types_console.go +++ b/vendor/github.com/openshift/api/config/v1/types_console.go @@ -52,5 +52,6 @@ type ConsoleAuthentication struct { // provides the user the option to perform single logout (SLO) through the identity // provider to destroy their single sign-on session. // +optional + // +kubebuilder:validation:Pattern=^$|^((https):\/\/?)[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/?))$ LogoutRedirect string `json:"logoutRedirect,omitempty"` } diff --git a/vendor/github.com/openshift/api/config/v1/types_features.go b/vendor/github.com/openshift/api/config/v1/types_feature.go similarity index 56% rename from vendor/github.com/openshift/api/config/v1/types_features.go rename to vendor/github.com/openshift/api/config/v1/types_feature.go index c55db6d5f43..94d1a7a4017 100644 --- a/vendor/github.com/openshift/api/config/v1/types_features.go +++ b/vendor/github.com/openshift/api/config/v1/types_feature.go @@ -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 @@ -31,30 +31,30 @@ 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 @@ -62,15 +62,28 @@ type FeatureEnabledDisabled struct { // 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{ - Enabled: []string{}, - Disabled: []string{"PersistentLocalVolumes"}, +// 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]*FeatureGateEnabledDisabled{ + Default: &FeatureGateEnabledDisabled{ + Enabled: []string{ + "ExperimentalCriticalPodAnnotation", // sig-pod, sjenning + "RotateKubeletServerCertificate", // sig-pod, sjenning + "SupportPodPidsLimit", // sig-pod, sjenning + }, + Disabled: []string{ + "LocalStorageCapacityIsolation", // sig-pod, sjenning + }, }, - TechPreviewNoUpgrade: &FeatureEnabledDisabled{ - Enabled: []string{}, - Disabled: []string{}, + TechPreviewNoUpgrade: &FeatureGateEnabledDisabled{ + Enabled: []string{ + "ExperimentalCriticalPodAnnotation", // sig-pod, sjenning + "RotateKubeletServerCertificate", // sig-pod, sjenning + "SupportPodPidsLimit", // sig-pod, sjenning + }, + Disabled: []string{ + "LocalStorageCapacityIsolation", // sig-pod, sjenning + }, }, } diff --git a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go index 7993f57cfe8..b1a7579a760 100644 --- a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go +++ b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go @@ -22,8 +22,12 @@ type Infrastructure struct { // InfrastructureSpec contains settings that apply to the cluster infrastructure. type InfrastructureSpec struct { - // secret reference? - // configmap reference to file? + // cloudConfig is a reference to a ConfigMap containing the cloud provider configuration file. + // This configuration file is used to configure the Kubernetes cloud provider integration + // when using the built-in cloud provider integration or the external cloud controller manager. + // The namespace for this config map is openshift-config. + // +optional + CloudConfig ConfigMapFileReference `json:"cloudConfig"` } // InfrastructureStatus describes the infrastructure the cluster is leveraging. diff --git a/vendor/github.com/openshift/api/config/v1/types_oauth.go b/vendor/github.com/openshift/api/config/v1/types_oauth.go index 6e4ed1ca1a6..7aa0133e732 100644 --- a/vendor/github.com/openshift/api/config/v1/types_oauth.go +++ b/vendor/github.com/openshift/api/config/v1/types_oauth.go @@ -121,12 +121,6 @@ type IdentityProvider struct { // Ref: https://godoc.org/github.com/openshift/origin/pkg/user/apis/user/validation#ValidateIdentityProviderName Name string `json:"name"` - // challenge indicates whether to issue WWW-Authenticate challenges for this provider - UseAsChallenger bool `json:"challenge"` - - // login indicates whether to use this identity provider for unauthenticated browsers to login against - UseAsLogin bool `json:"login"` - // mappingMethod determines how identities from this provider are mapped to users // Defaults to "claim" // +optional @@ -517,28 +511,14 @@ type OpenIDIdentityProvider struct { // +optional ExtraAuthorizeParameters map[string]string `json:"extraAuthorizeParameters,omitempty"` - // urls to use to authenticate - URLs OpenIDURLs `json:"urls"` + // issuer is the URL that the OpenID Provider asserts as its Issuer Identifier. + // It must use the https scheme with no query or fragment component. + Issuer string `json:"issuer"` // claims mappings Claims OpenIDClaims `json:"claims"` } -// OpenIDURLs are URLs to use when authenticating with an OpenID identity provider -type OpenIDURLs struct { - // authorize is the oauth authorization URL - Authorize string `json:"authorize"` - - // token is the oauth token granting URL - Token string `json:"token"` - - // userInfo is the optional userinfo URL. - // If present, a granted access_token is used to request claims - // If empty, a granted id_token is parsed for claims - // +optional - UserInfo string `json:"userInfo"` -} - // UserIDClaim is the claim used to provide a stable identifier for OIDC identities. // Per http://openid.net/specs/openid-connect-core-1_0.html#ClaimStability // "The sub (subject) and iss (issuer) Claims, used together, are the only Claims that an RP can diff --git a/vendor/github.com/openshift/api/config/v1/types_scheduling.go b/vendor/github.com/openshift/api/config/v1/types_scheduling.go index f07e7b083e8..a65ced9592c 100644 --- a/vendor/github.com/openshift/api/config/v1/types_scheduling.go +++ b/vendor/github.com/openshift/api/config/v1/types_scheduling.go @@ -27,6 +27,27 @@ type SchedulerSpec struct { // The namespace for this configmap is openshift-config. // +optional Policy ConfigMapNameReference `json:"policy"` + // defaultNodeSelector helps set the cluster-wide default node selector to + // restrict pod placement to specific nodes. This is applied to the pods + // created in all namespaces without a specified nodeSelector value. + // For example, + // defaultNodeSelector: "type=user-node,region=east" would set nodeSelector + // field in pod spec to "type=user-node,region=east" to all pods created + // in all namespaces. Namespaces having project-wide node selectors won't be + // impacted even if this field is set. This adds an annotation section to + // the namespace. + // For example, if a new namespace is created with + // node-selector='type=user-node,region=east', + // the annotation openshift.io/node-selector: type=user-node,region=east + // gets added to the project. When the openshift.io/node-selector annotation + // is set on the project the value is used in preference to the value we are setting + // for defaultNodeSelector field. + // For instance, + // openshift.io/node-selector: "type=user-node,region=west" means + // that the default of "type=user-node,region=east" set in defaultNodeSelector + // would not be applied. + // +optional + DefaultNodeSelector string `json:"defaultNodeSelector,omitempty"` } type SchedulerStatus struct { diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go index a3be0e654fb..63cbfa623a3 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go @@ -1164,67 +1164,67 @@ func (in *EtcdStorageConfig) DeepCopy() *EtcdStorageConfig { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureEnabledDisabled) DeepCopyInto(out *FeatureEnabledDisabled) { +func (in *FeatureGate) DeepCopyInto(out *FeatureGate) { *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Disabled != nil { - in, out := &in.Disabled, &out.Disabled - *out = make([]string, len(*in)) - copy(*out, *in) - } + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureEnabledDisabled. -func (in *FeatureEnabledDisabled) DeepCopy() *FeatureEnabledDisabled { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGate. +func (in *FeatureGate) DeepCopy() *FeatureGate { if in == nil { return nil } - out := new(FeatureEnabledDisabled) + out := new(FeatureGate) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FeatureGate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Features) DeepCopyInto(out *Features) { +func (in *FeatureGateEnabledDisabled) DeepCopyInto(out *FeatureGateEnabledDisabled) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Disabled != nil { + in, out := &in.Disabled, &out.Disabled + *out = make([]string, len(*in)) + copy(*out, *in) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Features. -func (in *Features) DeepCopy() *Features { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGateEnabledDisabled. +func (in *FeatureGateEnabledDisabled) DeepCopy() *FeatureGateEnabledDisabled { if in == nil { return nil } - out := new(Features) + out := new(FeatureGateEnabledDisabled) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Features) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeaturesList) DeepCopyInto(out *FeaturesList) { +func (in *FeatureGateList) DeepCopyInto(out *FeatureGateList) { *out = *in out.TypeMeta = in.TypeMeta out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]Features, len(*in)) + *out = make([]FeatureGate, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -1232,18 +1232,18 @@ func (in *FeaturesList) DeepCopyInto(out *FeaturesList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeaturesList. -func (in *FeaturesList) DeepCopy() *FeaturesList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGateList. +func (in *FeatureGateList) DeepCopy() *FeatureGateList { if in == nil { return nil } - out := new(FeaturesList) + out := new(FeatureGateList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *FeaturesList) DeepCopyObject() runtime.Object { +func (in *FeatureGateList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -1251,33 +1251,33 @@ func (in *FeaturesList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeaturesSpec) DeepCopyInto(out *FeaturesSpec) { +func (in *FeatureGateSpec) DeepCopyInto(out *FeatureGateSpec) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeaturesSpec. -func (in *FeaturesSpec) DeepCopy() *FeaturesSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGateSpec. +func (in *FeatureGateSpec) DeepCopy() *FeatureGateSpec { if in == nil { return nil } - out := new(FeaturesSpec) + out := new(FeatureGateSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeaturesStatus) DeepCopyInto(out *FeaturesStatus) { +func (in *FeatureGateStatus) DeepCopyInto(out *FeatureGateStatus) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeaturesStatus. -func (in *FeaturesStatus) DeepCopy() *FeaturesStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGateStatus. +func (in *FeatureGateStatus) DeepCopy() *FeatureGateStatus { if in == nil { return nil } - out := new(FeaturesStatus) + out := new(FeatureGateStatus) in.DeepCopyInto(out) return out } @@ -1294,15 +1294,6 @@ func (in *GenericAPIServerConfig) DeepCopyInto(out *GenericAPIServerConfig) { in.AuditConfig.DeepCopyInto(&out.AuditConfig) in.StorageConfig.DeepCopyInto(&out.StorageConfig) in.AdmissionConfig.DeepCopyInto(&out.AdmissionConfig) - if in.AdmissionPluginConfig != nil { - in, out := &in.AdmissionPluginConfig, &out.AdmissionPluginConfig - *out = make(map[string]AdmissionPluginConfig, len(*in)) - for key, val := range *in { - newVal := new(AdmissionPluginConfig) - val.DeepCopyInto(newVal) - (*out)[key] = *newVal - } - } out.KubeClientConfig = in.KubeClientConfig return } @@ -1738,6 +1729,7 @@ func (in *InfrastructureList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *InfrastructureSpec) DeepCopyInto(out *InfrastructureSpec) { *out = *in + out.CloudConfig = in.CloudConfig return } @@ -2307,7 +2299,6 @@ func (in *OpenIDIdentityProvider) DeepCopyInto(out *OpenIDIdentityProvider) { (*out)[key] = val } } - out.URLs = in.URLs in.Claims.DeepCopyInto(&out.Claims) return } @@ -2322,22 +2313,6 @@ func (in *OpenIDIdentityProvider) DeepCopy() *OpenIDIdentityProvider { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenIDURLs) DeepCopyInto(out *OpenIDURLs) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenIDURLs. -func (in *OpenIDURLs) DeepCopy() *OpenIDURLs { - if in == nil { - return nil - } - out := new(OpenIDURLs) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OperandVersion) DeepCopyInto(out *OperandVersion) { *out = *in diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go index 1545e4e2b49..5f93993ef11 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go @@ -610,31 +610,31 @@ func (DNSZone) SwaggerDoc() map[string]string { return map_DNSZone } -var map_Features = map[string]string{ - "": "Features holds cluster-wide information about feature gates. The canonical name is `cluster`", +var map_FeatureGate = map[string]string{ + "": "Feature holds cluster-wide information about feature gates. The canonical name is `cluster`", "metadata": "Standard object's metadata.", "spec": "spec holds user settable values for configuration", "status": "status holds observed values from the cluster. They may not be overridden.", } -func (Features) SwaggerDoc() map[string]string { - return map_Features +func (FeatureGate) SwaggerDoc() map[string]string { + return map_FeatureGate } -var map_FeaturesList = map[string]string{ +var map_FeatureGateList = map[string]string{ "metadata": "Standard object's metadata.", } -func (FeaturesList) SwaggerDoc() map[string]string { - return map_FeaturesList +func (FeatureGateList) SwaggerDoc() map[string]string { + return map_FeatureGateList } -var map_FeaturesSpec = map[string]string{ +var map_FeatureGateSpec = map[string]string{ "featureSet": "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.", } -func (FeaturesSpec) SwaggerDoc() map[string]string { - return map_FeaturesSpec +func (FeatureGateSpec) SwaggerDoc() map[string]string { + return map_FeatureGateSpec } var map_Image = map[string]string{ @@ -718,7 +718,8 @@ func (InfrastructureList) SwaggerDoc() map[string]string { } var map_InfrastructureSpec = map[string]string{ - "": "InfrastructureSpec contains settings that apply to the cluster infrastructure.", + "": "InfrastructureSpec contains settings that apply to the cluster infrastructure.", + "cloudConfig": "cloudConfig is a reference to a ConfigMap containing the cloud provider configuration file. This configuration file is used to configure the Kubernetes cloud provider integration when using the built-in cloud provider integration or the external cloud controller manager. The namespace for this config map is openshift-config.", } func (InfrastructureSpec) SwaggerDoc() map[string]string { @@ -872,8 +873,6 @@ func (HTPasswdIdentityProvider) SwaggerDoc() map[string]string { var map_IdentityProvider = map[string]string{ "": "IdentityProvider provides identities for users authenticating using credentials", "name": "name is used to qualify the identities returned by this provider. - It MUST be unique and not shared by any other identity provider used - It MUST be a valid path segment: name cannot equal \".\" or \"..\" or contain \"/\" or \"%\" or \":\"\n Ref: https://godoc.org/github.com/openshift/origin/pkg/user/apis/user/validation#ValidateIdentityProviderName", - "challenge": "challenge indicates whether to issue WWW-Authenticate challenges for this provider", - "login": "login indicates whether to use this identity provider for unauthenticated browsers to login against", "mappingMethod": "mappingMethod determines how identities from this provider are mapped to users Defaults to \"claim\"", } @@ -1002,25 +1001,14 @@ var map_OpenIDIdentityProvider = map[string]string{ "ca": "ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. The key \"ca.crt\" is used to locate the data. If specified and the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. If empty, the default system roots are used. The namespace for this config map is openshift-config.", "extraScopes": "extraScopes are any scopes to request in addition to the standard \"openid\" scope.", "extraAuthorizeParameters": "extraAuthorizeParameters are any custom parameters to add to the authorize request.", - "urls": "urls to use to authenticate", - "claims": "claims mappings", + "issuer": "issuer is the URL that the OpenID Provider asserts as its Issuer Identifier. It must use the https scheme with no query or fragment component.", + "claims": "claims mappings", } func (OpenIDIdentityProvider) SwaggerDoc() map[string]string { return map_OpenIDIdentityProvider } -var map_OpenIDURLs = map[string]string{ - "": "OpenIDURLs are URLs to use when authenticating with an OpenID identity provider", - "authorize": "authorize is the oauth authorization URL", - "token": "token is the oauth token granting URL", - "userInfo": "userInfo is the optional userinfo URL. If present, a granted access_token is used to request claims If empty, a granted id_token is parsed for claims", -} - -func (OpenIDURLs) SwaggerDoc() map[string]string { - return map_OpenIDURLs -} - var map_RequestHeaderIdentityProvider = map[string]string{ "": "RequestHeaderIdentityProvider provides identities for users authenticating using request header credentials", "loginURL": "loginURL is a URL to redirect unauthenticated /authorize requests to Unauthenticated requests from OAuth clients which expect interactive logins will be redirected here ${url} is replaced with the current URL, escaped to be safe in a query parameter\n https://www.example.com/sso-login?then=${url}\n${query} is replaced with the current query string\n https://www.example.com/auth-proxy/oauth/authorize?${query}\nRequired when login is set to true.", @@ -1132,7 +1120,8 @@ func (SchedulerList) SwaggerDoc() map[string]string { } var map_SchedulerSpec = map[string]string{ - "policy": "policy is a reference to a ConfigMap containing scheduler policy which has user specified predicates and priorities. If this ConfigMap is not available scheduler will default to use DefaultAlgorithmProvider. The namespace for this configmap is openshift-config.", + "policy": "policy is a reference to a ConfigMap containing scheduler policy which has user specified predicates and priorities. If this ConfigMap is not available scheduler will default to use DefaultAlgorithmProvider. The namespace for this configmap is openshift-config.", + "defaultNodeSelector": "defaultNodeSelector helps set the cluster-wide default node selector to restrict pod placement to specific nodes. This is applied to the pods created in all namespaces without a specified nodeSelector value. For example, defaultNodeSelector: \"type=user-node,region=east\" would set nodeSelector field in pod spec to \"type=user-node,region=east\" to all pods created in all namespaces. Namespaces having project-wide node selectors won't be impacted even if this field is set. This adds an annotation section to the namespace. For example, if a new namespace is created with node-selector='type=user-node,region=east', the annotation openshift.io/node-selector: type=user-node,region=east gets added to the project. When the openshift.io/node-selector annotation is set on the project the value is used in preference to the value we are setting for defaultNodeSelector field. For instance, openshift.io/node-selector: \"type=user-node,region=west\" means that the default of \"type=user-node,region=east\" set in defaultNodeSelector would not be applied.", } func (SchedulerSpec) SwaggerDoc() map[string]string { diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/config_client.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/config_client.go index cf870c8e554..cd28c36e2d0 100644 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/config_client.go +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/config_client.go @@ -18,7 +18,7 @@ type ConfigV1Interface interface { ClusterVersionsGetter ConsolesGetter DNSesGetter - FeaturesGetter + FeatureGatesGetter ImagesGetter InfrastructuresGetter IngressesGetter @@ -62,8 +62,8 @@ func (c *ConfigV1Client) DNSes() DNSInterface { return newDNSes(c) } -func (c *ConfigV1Client) Features() FeaturesInterface { - return newFeatures(c) +func (c *ConfigV1Client) FeatureGates() FeatureGateInterface { + return newFeatureGates(c) } func (c *ConfigV1Client) Images() ImageInterface { diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/featuregate.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/featuregate.go new file mode 100644 index 00000000000..72da006b19e --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/featuregate.go @@ -0,0 +1,147 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "github.com/openshift/api/config/v1" + scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// FeatureGatesGetter has a method to return a FeatureGateInterface. +// A group's client should implement this interface. +type FeatureGatesGetter interface { + FeatureGates() FeatureGateInterface +} + +// FeatureGateInterface has methods to work with FeatureGate resources. +type FeatureGateInterface interface { + Create(*v1.FeatureGate) (*v1.FeatureGate, error) + Update(*v1.FeatureGate) (*v1.FeatureGate, error) + UpdateStatus(*v1.FeatureGate) (*v1.FeatureGate, error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.FeatureGate, error) + List(opts meta_v1.ListOptions) (*v1.FeatureGateList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.FeatureGate, err error) + FeatureGateExpansion +} + +// featureGates implements FeatureGateInterface +type featureGates struct { + client rest.Interface +} + +// newFeatureGates returns a FeatureGates +func newFeatureGates(c *ConfigV1Client) *featureGates { + return &featureGates{ + client: c.RESTClient(), + } +} + +// Get takes name of the featureGate, and returns the corresponding featureGate object, and an error if there is any. +func (c *featureGates) Get(name string, options meta_v1.GetOptions) (result *v1.FeatureGate, err error) { + result = &v1.FeatureGate{} + err = c.client.Get(). + Resource("featuregates"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of FeatureGates that match those selectors. +func (c *featureGates) List(opts meta_v1.ListOptions) (result *v1.FeatureGateList, err error) { + result = &v1.FeatureGateList{} + err = c.client.Get(). + Resource("featuregates"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested featureGates. +func (c *featureGates) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("featuregates"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a featureGate and creates it. Returns the server's representation of the featureGate, and an error, if there is any. +func (c *featureGates) Create(featureGate *v1.FeatureGate) (result *v1.FeatureGate, err error) { + result = &v1.FeatureGate{} + err = c.client.Post(). + Resource("featuregates"). + Body(featureGate). + Do(). + Into(result) + return +} + +// Update takes the representation of a featureGate and updates it. Returns the server's representation of the featureGate, and an error, if there is any. +func (c *featureGates) Update(featureGate *v1.FeatureGate) (result *v1.FeatureGate, err error) { + result = &v1.FeatureGate{} + err = c.client.Put(). + Resource("featuregates"). + Name(featureGate.Name). + Body(featureGate). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + +func (c *featureGates) UpdateStatus(featureGate *v1.FeatureGate) (result *v1.FeatureGate, err error) { + result = &v1.FeatureGate{} + err = c.client.Put(). + Resource("featuregates"). + Name(featureGate.Name). + SubResource("status"). + Body(featureGate). + Do(). + Into(result) + return +} + +// Delete takes name of the featureGate and deletes it. Returns an error if one occurs. +func (c *featureGates) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Resource("featuregates"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *featureGates) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Resource("featuregates"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched featureGate. +func (c *featureGates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.FeatureGate, err error) { + result = &v1.FeatureGate{} + err = c.client.Patch(pt). + Resource("featuregates"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/features.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/features.go deleted file mode 100644 index a6eb5983a6a..00000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/features.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/openshift/api/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// FeaturesGetter has a method to return a FeaturesInterface. -// A group's client should implement this interface. -type FeaturesGetter interface { - Features() FeaturesInterface -} - -// FeaturesInterface has methods to work with Features resources. -type FeaturesInterface interface { - Create(*v1.Features) (*v1.Features, error) - Update(*v1.Features) (*v1.Features, error) - UpdateStatus(*v1.Features) (*v1.Features, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.Features, error) - List(opts meta_v1.ListOptions) (*v1.FeaturesList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Features, err error) - FeaturesExpansion -} - -// features implements FeaturesInterface -type features struct { - client rest.Interface -} - -// newFeatures returns a Features -func newFeatures(c *ConfigV1Client) *features { - return &features{ - client: c.RESTClient(), - } -} - -// Get takes name of the features, and returns the corresponding features object, and an error if there is any. -func (c *features) Get(name string, options meta_v1.GetOptions) (result *v1.Features, err error) { - result = &v1.Features{} - err = c.client.Get(). - Resource("features"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Features that match those selectors. -func (c *features) List(opts meta_v1.ListOptions) (result *v1.FeaturesList, err error) { - result = &v1.FeaturesList{} - err = c.client.Get(). - Resource("features"). - VersionedParams(&opts, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested features. -func (c *features) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { - opts.Watch = true - return c.client.Get(). - Resource("features"). - VersionedParams(&opts, scheme.ParameterCodec). - Watch() -} - -// Create takes the representation of a features and creates it. Returns the server's representation of the features, and an error, if there is any. -func (c *features) Create(features *v1.Features) (result *v1.Features, err error) { - result = &v1.Features{} - err = c.client.Post(). - Resource("features"). - Body(features). - Do(). - Into(result) - return -} - -// Update takes the representation of a features and updates it. Returns the server's representation of the features, and an error, if there is any. -func (c *features) Update(features *v1.Features) (result *v1.Features, err error) { - result = &v1.Features{} - err = c.client.Put(). - Resource("features"). - Name(features.Name). - Body(features). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *features) UpdateStatus(features *v1.Features) (result *v1.Features, err error) { - result = &v1.Features{} - err = c.client.Put(). - Resource("features"). - Name(features.Name). - SubResource("status"). - Body(features). - Do(). - Into(result) - return -} - -// Delete takes name of the features and deletes it. Returns an error if one occurs. -func (c *features) Delete(name string, options *meta_v1.DeleteOptions) error { - return c.client.Delete(). - Resource("features"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *features) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { - return c.client.Delete(). - Resource("features"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched features. -func (c *features) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Features, err error) { - result = &v1.Features{} - err = c.client.Patch(pt). - Resource("features"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/generated_expansion.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/generated_expansion.go index 822a30c3584..ad1005fb787 100644 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/generated_expansion.go +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/generated_expansion.go @@ -16,7 +16,7 @@ type ConsoleExpansion interface{} type DNSExpansion interface{} -type FeaturesExpansion interface{} +type FeatureGateExpansion interface{} type ImageExpansion interface{}