From 5f132e969aba4093974e04eb542768aab6d1775c Mon Sep 17 00:00:00 2001 From: staebler Date: Fri, 25 Jan 2019 17:11:14 -0500 Subject: [PATCH 1/3] vendor: update to latest version of openshift/client-go The ClusterVersion client is not available in the version of openshift/client-go that was pinned. These changes remove the pinnings of openshift/client-go and openshift/api. Commands run: dep ensure dep ensure -update github.com/openshift/api --- Gopkg.lock | 14 +- Gopkg.toml | 8 - .../openshift/api/config/v1/register.go | 6 +- .../openshift/api/config/v1/types.go | 23 +- .../api/config/v1/types_apiserver.go | 73 ++ .../api/config/v1/types_authentication.go | 62 +- .../openshift/api/config/v1/types_build.go | 40 +- .../api/config/v1/types_cluster_operator.go | 36 +- .../api/config/v1/types_cluster_version.go | 32 +- .../openshift/api/config/v1/types_idp.go | 36 - .../openshift/api/config/v1/types_image.go | 3 +- .../openshift/api/config/v1/types_oauth.go | 391 +++--- .../openshift/api/config/v1/types_project.go | 20 +- .../openshift/api/config/v1/types_proxy.go | 37 + .../api/config/v1/types_scheduling.go | 8 +- .../config/v1/types_swagger_doc_generated.go | 228 ---- .../api/config/v1/zz_generated.deepcopy.go | 579 ++++++--- .../v1/zz_generated.swagger_doc_generated.go | 1065 +++++++++++++++++ ... => zz_generated.swagger_doc_generated.go} | 2 +- .../config/clientset/versioned/clientset.go | 82 ++ .../config/clientset/versioned/doc.go | 4 + .../config/clientset/versioned/scheme/doc.go | 4 + .../clientset/versioned/scheme/register.go | 38 + .../typed/config/v1/authentication.go | 147 +++ .../versioned/typed/config/v1/build.go | 131 ++ .../typed/config/v1/clusteroperator.go | 147 +++ .../typed/config/v1/clusterversion.go | 147 +++ .../typed/config/v1/config_client.go | 139 +++ .../versioned/typed/config/v1/console.go | 147 +++ .../versioned/typed/config/v1/dns.go | 147 +++ .../versioned/typed/config/v1/doc.go | 4 + .../typed/config/v1/generated_expansion.go | 31 + .../versioned/typed/config/v1/image.go | 147 +++ .../typed/config/v1/infrastructure.go | 147 +++ .../versioned/typed/config/v1/ingress.go | 147 +++ .../versioned/typed/config/v1/network.go | 147 +++ .../versioned/typed/config/v1/oauth.go | 147 +++ .../versioned/typed/config/v1/project.go | 147 +++ .../versioned/typed/config/v1/proxy.go | 131 ++ .../versioned/typed/config/v1/scheduling.go | 147 +++ .../route/clientset/versioned/clientset.go | 4 +- .../route/clientset/versioned/doc.go | 2 + .../route/clientset/versioned/scheme/doc.go | 2 + .../clientset/versioned/scheme/register.go | 5 +- .../clientset/versioned/typed/route/v1/doc.go | 2 + .../typed/route/v1/generated_expansion.go | 2 + .../versioned/typed/route/v1/route.go | 2 + .../versioned/typed/route/v1/route_client.go | 2 + 48 files changed, 4320 insertions(+), 692 deletions(-) create mode 100644 vendor/github.com/openshift/api/config/v1/types_apiserver.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_idp.go create mode 100644 vendor/github.com/openshift/api/config/v1/types_proxy.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_swagger_doc_generated.go create mode 100644 vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go rename vendor/github.com/openshift/api/route/v1/{types_swagger_doc_generated.go => zz_generated.swagger_doc_generated.go} (99%) create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/clientset.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/doc.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/scheme/doc.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/scheme/register.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/authentication.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/build.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/clusteroperator.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/clusterversion.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/config_client.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/console.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/dns.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/doc.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/generated_expansion.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/image.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/infrastructure.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/ingress.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/network.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/oauth.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/project.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/proxy.go create mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/scheduling.go diff --git a/Gopkg.lock b/Gopkg.lock index 35b9eeb1789..7c7170e7f6b 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -370,25 +370,30 @@ version = "1.0.1" [[projects]] - digest = "1:ae6f25905d1386e85891d65085f12afb7d8729a4153211cf11f0a19b5e17bf3e" + branch = "master" + digest = "1:bc5beeb231c43286b9f51c52d85fbc6e4b4d9b540ff2a3f39b57c3d5b3733210" name = "github.com/openshift/api" packages = [ "config/v1", "route/v1", ] pruneopts = "NUT" - revision = "aab033bae2a129607f4fb277c3777b2eabb08601" + revision = "ae9a3391d2d18df1c8ab76dc0738884f18a71138" [[projects]] - digest = "1:6b1540f37963c713da08d8463791201d8469e8c755ed66a0b54ee424b15ea401" + branch = "master" + digest = "1:ba4a703e7b8e2f26d071083cc1238b1cbabd99f7bcfc8e3891d4042ce8761691" name = "github.com/openshift/client-go" packages = [ + "config/clientset/versioned", + "config/clientset/versioned/scheme", + "config/clientset/versioned/typed/config/v1", "route/clientset/versioned", "route/clientset/versioned/scheme", "route/clientset/versioned/typed/route/v1", ] pruneopts = "NUT" - revision = "1fa528d3be060e4c7178eb69e76d37cf7e699e3c" + revision = "f9132806c9914790e15f10d8c5d1e7a03408d7b2" [[projects]] branch = "master" @@ -882,6 +887,7 @@ "github.com/gregjones/httpcache/diskcache", "github.com/libvirt/libvirt-go", "github.com/openshift/api/config/v1", + "github.com/openshift/client-go/config/clientset/versioned", "github.com/openshift/client-go/route/clientset/versioned", "github.com/openshift/cluster-api-provider-libvirt/pkg/apis/libvirtproviderconfig/v1alpha1", "github.com/openshift/cluster-network-operator/pkg/apis/networkoperator/v1", diff --git a/Gopkg.toml b/Gopkg.toml index ceea71e55cf..82e796fc8d3 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -80,14 +80,6 @@ ignored = [ name = "github.com/gophercloud/utils" revision = "34f5991525d116b3832e0d9409492274f1c06bda" -[[constraint]] - name = "github.com/openshift/api" - revision = "aab033bae2a129607f4fb277c3777b2eabb08601" - -[[constraint]] - name = "github.com/openshift/client-go" - revision = "1fa528d3be060e4c7178eb69e76d37cf7e699e3c" - [[constraint]] branch = "master" name = "github.com/gophercloud/gophercloud" diff --git a/vendor/github.com/openshift/api/config/v1/register.go b/vendor/github.com/openshift/api/config/v1/register.go index eed769098d4..2f0ff20c4f3 100644 --- a/vendor/github.com/openshift/api/config/v1/register.go +++ b/vendor/github.com/openshift/api/config/v1/register.go @@ -30,6 +30,8 @@ func Resource(resource string) schema.GroupResource { // Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(GroupVersion, + &APIServer{}, + &APIServerList{}, &Authentication{}, &AuthenticationList{}, &Build{}, @@ -42,8 +44,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ConsoleList{}, &DNS{}, &DNSList{}, - &IdentityProvider{}, - &IdentityProviderList{}, &Image{}, &ImageList{}, &Infrastructure{}, @@ -56,6 +56,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &OAuthList{}, &Project{}, &ProjectList{}, + &Proxy{}, + &ProxyList{}, &Scheduling{}, &SchedulingList{}, ) diff --git a/vendor/github.com/openshift/api/config/v1/types.go b/vendor/github.com/openshift/api/config/v1/types.go index 7445c4fff8d..cfb9ef805dc 100644 --- a/vendor/github.com/openshift/api/config/v1/types.go +++ b/vendor/github.com/openshift/api/config/v1/types.go @@ -5,19 +5,26 @@ import ( "k8s.io/apimachinery/pkg/runtime" ) -// ConfigMapReference references a configmap in the openshift-config namespace. -type ConfigMapReference struct { +// ConfigMapFileReference references a config map in a specific namespace. +// The namespace must be specified at the point of use. +type ConfigMapFileReference struct { Name string `json:"name"` // Key allows pointing to a specific key/value inside of the configmap. This is useful for logical file references. - Key string `json:"filename,omitempty"` + Key string `json:"key,omitempty"` } -// LocalSecretReference references a secret within the local namespace -type LocalSecretReference struct { - // Name of the secret in the local namespace +// ConfigMapNameReference references a config map in a specific namespace. +// The namespace must be specified at the point of use. +type ConfigMapNameReference struct { + // name is the metadata.name of the referenced config map + Name string `json:"name"` +} + +// SecretNameReference references a secret in a specific namespace. +// The namespace must be specified at the point of use. +type SecretNameReference struct { + // name is the metadata.name of the referenced secret Name string `json:"name"` - // Key selects a specific key within the local secret. Must be a valid secret key. - Key string `json:"key,omitempty"` } // HTTPServingInfo holds configuration for serving HTTP diff --git a/vendor/github.com/openshift/api/config/v1/types_apiserver.go b/vendor/github.com/openshift/api/config/v1/types_apiserver.go new file mode 100644 index 00000000000..5f54f8f1a9c --- /dev/null +++ b/vendor/github.com/openshift/api/config/v1/types_apiserver.go @@ -0,0 +1,73 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// APIServer holds cluster-wide information about api-servers. The canonical name is `cluster` +type APIServer struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec APIServerSpec `json:"spec"` + Status APIServerStatus `json:"status"` +} + +type APIServerSpec struct { + // servingCert is the TLS cert info for serving secure traffic. If not specified, operator managed certificates + // will be used for serving secure traffic. + // +optional + ServingCerts APIServerServingCerts `json:"servingCerts,omitempty"` + // clientCA references a ConfigMap containing a certificate bundle for the signers that will be recognized for + // incoming client certificates in addition to the operator managed signers. If this is empty, then only operator managed signers are valid. + // You usually only have to set this if you have your own PKI you wish to honor client certificates from. + // The ConfigMap must exist in the openshift-config namespace and contain the following required fields: + // - ConfigMap.Data["ca-bundle.crt"] - CA bundle. + // +optional + ClientCA ConfigMapNameReference `json:"clientCA,omitempty"` +} + +type APIServerServingCerts struct { + // defaultServingCertificate references a kubernetes.io/tls type secret containing the default TLS cert info for + // serving secure traffic. If no named certificates match the server name as understood by a client, this default + // certificate will be used. If defaultServingCertificate is not specified, then a operator managed certificate will + // be used. + // The secret must exist in the openshift-config namespace and contain the following required fields: + // - Secret.Data["tls.key"] - TLS private key. + // - Secret.Data["tls.crt"] - TLS certificate. + // +optional + DefaultServingCertificate SecretNameReference `json:"defaultServingCertificate,omitempty"` + // namedCertificates references secrets containing the TLS cert info for serving secure traffic to specific hostnames. + // If no named certificates are provided, or no named certificates match the server name as understood by a client, + // the defaultServingCertificate will be used. + // +optional + NamedCertificates []APIServerNamedServingCert `json:"namedCertificates,omitempty"` +} + +// APIServerNamedServingCert maps a server DNS name, as understood by a client, to a certificate. +type APIServerNamedServingCert struct { + // names is a optional list of explicit DNS names (leading wildcards allowed) that should use this certificate to + // serve secure traffic. If no names are provided, the implicit names will be extracted from the certificates. + // Exact names trump over wildcard names. Explicit names defined here trump over extracted implicit names. + // +optional + Names []string `json:"names"` + // servingCertificate references a kubernetes.io/tls type secret containing the TLS cert info for serving secure traffic. + // The secret must exist in the openshift-config namespace and contain the following required fields: + // - Secret.Data["tls.key"] - TLS private key. + // - Secret.Data["tls.crt"] - TLS certificate. + ServingCertificate SecretNameReference `json:"servingCertificate"` +} + +type APIServerStatus struct { +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type APIServerList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []APIServer `json:"items"` +} diff --git a/vendor/github.com/openshift/api/config/v1/types_authentication.go b/vendor/github.com/openshift/api/config/v1/types_authentication.go index af181c34e72..3880bd59372 100644 --- a/vendor/github.com/openshift/api/config/v1/types_authentication.go +++ b/vendor/github.com/openshift/api/config/v1/types_authentication.go @@ -19,6 +19,11 @@ type Authentication struct { } type AuthenticationSpec struct { + // type identifies the cluster managed, user facing authentication mode in use. + // Specifically, it manages the component that responds to login attempts. + // The default is IntegratedOAuth. + Type AuthenticationType `json:"type"` + // oauthMetadata contains the discovery endpoint data for OAuth 2.0 // Authorization Server Metadata for an external OAuth server. // This discovery document can be viewed from its served location: @@ -26,27 +31,41 @@ type AuthenticationSpec struct { // For further details, see the IETF Draft: // https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2 // If oauthMetadata.name is non-empty, this value has precedence - // over the observed value stored in status.oauthMetadata + // over any metadata reference stored in status. + // The key "oauthMetadata" is used to locate the data. + // If specified and the config map or expected key is not found, no metadata is served. + // If the specified metadata is not valid, no metadata is served. + // The namespace for this config map is openshift-config. // +optional - OAuthMetadata ConfigMapReference `json:"oauthMetadata"` + OAuthMetadata ConfigMapNameReference `json:"oauthMetadata"` // webhookTokenAuthenticators configures remote token reviewers. // These remote authentication webhooks can be used to verify bearer tokens // via the tokenreviews.authentication.k8s.io REST API. This is required to // honor bearer tokens that are provisioned by an external authentication service. + // The namespace for these secrets is openshift-config. + // +optional WebhookTokenAuthenticators []WebhookTokenAuthenticator `json:"webhookTokenAuthenticators"` } type AuthenticationStatus struct { - // oauthMetadata contains the discovery endpoint data for OAuth 2.0 - // Authorization Server Metadata for an external OAuth server. + // integratedOAuthMetadata contains the discovery endpoint data for OAuth 2.0 + // Authorization Server Metadata for the in-cluster integrated OAuth server. // This discovery document can be viewed from its served location: // oc get --raw '/.well-known/oauth-authorization-server' // For further details, see the IETF Draft: // https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2 // This contains the observed value based on cluster state. // An explicitly set value in spec.oauthMetadata has precedence over this field. - OAuthMetadata ConfigMapReference `json:"oauthMetadata"` + // This field has no meaning if authentication spec.type is not set to IntegratedOAuth. + // The key "oauthMetadata" is used to locate the data. + // If the config map or expected key is not found, no metadata is served. + // If the specified metadata is not valid, no metadata is served. + // The namespace for this config map is openshift-config-managed. + IntegratedOAuthMetadata ConfigMapNameReference `json:"integratedOAuthMetadata"` + + // TODO if we add support for an in-cluster operator managed Keycloak instance + // KeycloakOAuthMetadata ConfigMapNameReference `json:"keycloakOAuthMetadata"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -55,13 +74,42 @@ type AuthenticationList struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. metav1.ListMeta `json:"metadata,omitempty"` - Items []Authentication `json:"items"` + + Items []Authentication `json:"items"` } +type AuthenticationType string + +const ( + // None means that no cluster managed authentication system is in place. + // Note that user login will only work if a manually configured system is in place and + // referenced in authentication spec via oauthMetadata and webhookTokenAuthenticators. + AuthenticationTypeNone AuthenticationType = "None" + + // IntegratedOAuth refers to the cluster managed OAuth server. + // It is configured via the top level OAuth config. + AuthenticationTypeIntegratedOAuth AuthenticationType = "IntegratedOAuth" + + // TODO if we add support for an in-cluster operator managed Keycloak instance + // AuthenticationTypeKeycloak AuthenticationType = "Keycloak" +) + // webhookTokenAuthenticator holds the necessary configuration options for a remote token authenticator type WebhookTokenAuthenticator struct { // kubeConfig contains kube config file data which describes how to access the remote webhook service. // For further details, see: // https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication - KubeConfig LocalSecretReference `json:"kubeConfig"` + // The key "kubeConfig" is used to locate the data. + // If the secret or expected key is not found, the webhook is not honored. + // If the specified kube config data is not valid, the webhook is not honored. + // The namespace for this secret is determined by the point of use. + KubeConfig SecretNameReference `json:"kubeConfig"` } + +const ( + // OAuthMetadataKey is the key for the oauth authorization server metadata + OAuthMetadataKey = "oauthMetadata" + + // KubeConfigKey is the key for the kube config file data in a secret + KubeConfigKey = "kubeConfig" +) diff --git a/vendor/github.com/openshift/api/config/v1/types_build.go b/vendor/github.com/openshift/api/config/v1/types_build.go index 49d3d0fe681..05ea4da9f91 100644 --- a/vendor/github.com/openshift/api/config/v1/types_build.go +++ b/vendor/github.com/openshift/api/config/v1/types_build.go @@ -21,8 +21,9 @@ type Build struct { type BuildSpec struct { // AdditionalTrustedCA is a reference to a ConfigMap containing additional CAs that // should be trusted for image pushes and pulls during builds. + // The namespace for this config map is openshift-config. // +optional - AdditionalTrustedCA ConfigMapReference `json:"additionalTrustedCA,omitempty"` + AdditionalTrustedCA ConfigMapNameReference `json:"additionalTrustedCA,omitempty"` // BuildDefaults controls the default information for Builds // +optional BuildDefaults BuildDefaults `json:"buildDefaults,omitempty"` @@ -38,14 +39,14 @@ type BuildDefaults struct { // Values can be overrode by setting the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` environment variables // in the build config's strategy. // +optional - DefaultProxy *ProxyConfig `json:"defaultProxy,omitempty"` + DefaultProxy *ProxySpec `json:"defaultProxy,omitempty"` // GitProxy contains the proxy settings for git operations only. If set, this will override // any Proxy settings for all git commands, such as git clone. // // Values that are not set here will be inherited from DefaultProxy. // +optional - GitProxy *ProxyConfig `json:"gitProxy,omitempty"` + GitProxy *ProxySpec `json:"gitProxy,omitempty"` // Env is a set of default environment variables that will be applied to the // build if the specified variables do not exist on the build @@ -61,6 +62,10 @@ type BuildDefaults struct { // Resources defines resource requirements to execute the build. // +optional Resources corev1.ResourceRequirements `json:"resources,omitempty"` + + // RegistriesConfig controls the registries allowed for image pull and push. + // +optional + RegistriesConfig RegistriesConfig `json:"registriesConfig,omitempty"` } type ImageLabel struct { @@ -72,19 +77,26 @@ type ImageLabel struct { Value string `json:"value,omitempty"` } -// ProxyConfig defines what proxies to use for an operation -type ProxyConfig struct { - // HttpProxy is the URL of the proxy for HTTP requests +type RegistriesConfig struct { + // SearchRegistries lists the registries to search for images if an image repository is not specified in an image pull spec. + // + // If this is not set, builds will search Docker Hub (docker.io) when a repository is not specified. + // Setting this to an empty list will require all builds to fully qualify their image pull specs. // +optional - HTTPProxy string `json:"httpProxy,omitempty"` - - // HttpsProxy is the URL of the proxy for HTTPS requests + SearchRegistries *[]string `json:"searchRegistries,omitempty"` + // InsecureRegistries are registries which do not have a valid SSL certificate or only support HTTP connections. // +optional - HTTPSProxy string `json:"httpsProxy,omitempty"` - - // NoProxy is the list of domains for which the proxy should not be used + InsecureRegistries []string `json:"insecureRegistries,omitempty"` + // BlockedRegistries are blacklisted from image pull/push. All other registries are allowed. + // + // Only one of BlockedRegistries or AllowedRegistries may be set. + // +optional + BlockedRegistries []string `json:"blockedRegistries,omitempty"` + // AllowedRegistries are whitelisted for image pull/push. All other registries are blocked. + // + // Only one of BlockedRegistries or AllowedRegistries may be set. // +optional - NoProxy string `json:"noProxy,omitempty"` + AllowedRegistries []string `json:"allowedRegistries,omitempty"` } type BuildOverrides struct { @@ -96,7 +108,7 @@ type BuildOverrides struct { // NodeSelector is a selector which must be true for the build pod to fit on a node // +optional - NodeSelector metav1.LabelSelector `json:"nodeSelector,omitempty"` + NodeSelector map[string]string `json:"nodeSelector,omitempty"` // Tolerations is a list of Tolerations that will override any existing // tolerations set on a build pod. diff --git a/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go b/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go index d0c89ecf7a8..543c078c73e 100644 --- a/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go +++ b/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go @@ -36,15 +36,45 @@ type ClusterOperatorStatus struct { // +patchStrategy=merge Conditions []ClusterOperatorStatusCondition `json:"conditions" patchStrategy:"merge" patchMergeKey:"type"` - // version indicates which version of the operator updated the current - // status object. - Version string `json:"version"` + // versions is a slice of operand version tuples. Operators which manage multiple operands will have multiple + // entries in the array. If an operator is Available, it must have at least one entry. You must report the version of + // the operator itself with the name "operator". + Versions []OperandVersion `json:"versions"` + + // relatedObjects is a list of objects that are "interesting" or related to this operator. Common uses are: + // 1. the detailed resource driving the operator + // 2. operator namespaces + // 3. operand namespaces + RelatedObjects []ObjectReference `json:"relatedObjects"` // extension contains any additional status information specific to the // operator which owns this status object. Extension runtime.RawExtension `json:"extension,omitempty"` } +type OperandVersion struct { + // name is the name of the particular operand this version is for. It usually matches container images, not operators. + Name string `json:"name"` + + // version indicates which version of a particular operand is currently being manage. It must always match the Available + // condition. If 1.0.0 is Available, then this must indicate 1.0.0 even if the operator is trying to rollout + // 1.1.0 + Version string `json:"version"` +} + +// ObjectReference contains enough information to let you inspect or modify the referred object. +type ObjectReference struct { + // group of the referent. + Group string `json:"group"` + // resource of the referent. + Resource string `json:"resource"` + // namespace of the referent. + // +optional + Namespace string `json:"namespace,omitempty"` + // name of the referent. + Name string `json:"name"` +} + type ConditionStatus string // These are valid condition statuses. "ConditionTrue" means a resource is in the condition. diff --git a/vendor/github.com/openshift/api/config/v1/types_cluster_version.go b/vendor/github.com/openshift/api/config/v1/types_cluster_version.go index a43b12a69a6..3f808ba92e0 100644 --- a/vendor/github.com/openshift/api/config/v1/types_cluster_version.go +++ b/vendor/github.com/openshift/api/config/v1/types_cluster_version.go @@ -37,7 +37,8 @@ type ClusterVersionSpec struct { // the current version does not match the desired version). The set of // recommended update values is listed as part of available updates in // status, and setting values outside that range may cause the upgrade - // to fail. + // to fail. You may specify the version field without setting image if + // an update exists with that version in the availableUpdates or history. // // If an upgrade fails the operator will halt and report status // about the failing component. Setting the desired update value back to @@ -75,7 +76,7 @@ type ClusterVersionSpec struct { type ClusterVersionStatus struct { // desired is the version that the cluster is reconciling towards. // If the cluster is not yet fully initialized desired will be set - // with the information available, which may be a payload or a tag. + // with the information available, which may be an image or a tag. Desired Update `json:"desired"` // history contains a list of the most recent versions applied to the cluster. @@ -87,11 +88,10 @@ type ClusterVersionStatus struct { // is preserved. History []UpdateHistory `json:"history"` - // generation reports which version of the spec is being processed. - // If this value is not equal to metadata.generation, then the - // current and conditions fields have not yet been updated to reflect - // the latest request. - Generation int64 `json:"generation"` + // observedGeneration reports which version of the spec is being synced. + // If this value is not equal to metadata.generation, then the desired + // and conditions fields may represent from a previous version. + ObservedGeneration int64 `json:"observedGeneration"` // versionHash is a fingerprint of the content that the cluster will be // updated with. It is used by the operator to avoid unnecessary work @@ -144,14 +144,14 @@ type UpdateHistory struct { CompletionTime *metav1.Time `json:"completionTime"` // version is a semantic versioning identifying the update version. If the - // requested payload does not define a version, or if a failure occurs - // retrieving the payload, this value may be empty. + // requested image does not define a version, or if a failure occurs + // retrieving the image, this value may be empty. // // +optional Version string `json:"version"` - // payload is a container image location that contains the update. This value + // image is a container image location that contains the update. This value // is always populated. - Payload string `json:"payload"` + Image string `json:"image"` } // ClusterID is string RFC4122 uuid. @@ -182,20 +182,20 @@ type ComponentOverride struct { type URL string // Update represents a release of the ClusterVersionOperator, referenced by the -// Payload member. +// Image member. // +k8s:deepcopy-gen=true type Update struct { // version is a semantic versioning identifying the update version. When this - // field is part of spec, version is optional if payload is specified. + // field is part of spec, version is optional if image is specified. // // +optional Version string `json:"version"` - // payload is a container image location that contains the update. When this - // field is part of spec, payload is optional if version is specified and the + // image is a container image location that contains the update. When this + // field is part of spec, image is optional if version is specified and the // availableUpdates field contains a matching version. // // +optional - Payload string `json:"payload"` + Image string `json:"image"` } // RetrievedUpdates reports whether available updates have been retrieved from diff --git a/vendor/github.com/openshift/api/config/v1/types_idp.go b/vendor/github.com/openshift/api/config/v1/types_idp.go deleted file mode 100644 index c2425a068f2..00000000000 --- a/vendor/github.com/openshift/api/config/v1/types_idp.go +++ /dev/null @@ -1,36 +0,0 @@ -package v1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// IdentityProvider holds cluster-wide information about IdentityProvider. The canonical name is `cluster` -// TODO this object is an example of a possible grouping and is subject to change or removal -type IdentityProvider struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - Spec IdentityProviderSpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - Status IdentityProviderStatus `json:"status"` -} - -type IdentityProviderSpec struct { - // all the IDP settings -} - -type IdentityProviderStatus struct { -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type IdentityProviderList struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - metav1.ListMeta `json:"metadata,omitempty"` - Items []IdentityProvider `json:"items"` -} diff --git a/vendor/github.com/openshift/api/config/v1/types_image.go b/vendor/github.com/openshift/api/config/v1/types_image.go index 3b5b82964bb..c067d871223 100644 --- a/vendor/github.com/openshift/api/config/v1/types_image.go +++ b/vendor/github.com/openshift/api/config/v1/types_image.go @@ -35,7 +35,8 @@ type ImageSpec struct { // AdditionalTrustedCA is a reference to a ConfigMap containing additional CAs that // should be trusted during imagestream import. - AdditionalTrustedCA ConfigMapReference `json:"additionalTrustedCA,omitempty"` + // The namespace for this config map is openshift-config. + AdditionalTrustedCA ConfigMapNameReference `json:"additionalTrustedCA,omitempty"` } type ImageStatus struct { 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 91cffacdc19..1a24dc7e80d 100644 --- a/vendor/github.com/openshift/api/config/v1/types_oauth.go +++ b/vendor/github.com/openshift/api/config/v1/types_oauth.go @@ -1,8 +1,6 @@ package v1 -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // OAuth Server and Identity Provider Config @@ -10,18 +8,24 @@ import ( // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// OAuth holds cluster-wide information about OAuth. The canonical name is `cluster` +// OAuth holds cluster-wide information about OAuth. The canonical name is `cluster`. +// It is used to configure the integrated OAuth server. +// This configuration is only honored when the top level Authentication config has type set to IntegratedOAuth. type OAuth struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` - Spec OAuthSpec `json:"spec"` - Status OAuthStatus `json:"status,omitempty"` + + Spec OAuthSpec `json:"spec"` + + Status OAuthStatus `json:"status"` } // OAuthSpec contains desired cluster auth configuration type OAuthSpec struct { - // identityProviders is an ordered list of ways for a user to identify themselves - IdentityProviders []OAuthIdentityProvider `json:"identityProviders"` + // identityProviders is an ordered list of ways for a user to identify themselves. + // When this list is empty, no identities are provisioned for users. + // +optional + IdentityProviders []IdentityProvider `json:"identityProviders,omitempty"` // tokenConfig contains options for authorization and access tokens TokenConfig TokenConfig `json:"tokenConfig"` @@ -33,15 +37,14 @@ type OAuthSpec struct { // OAuthStatus shows current known state of OAuth server in the cluster type OAuthStatus struct { - // TODO Fill in + // TODO Fill in with status of identityProviders and templates (and maybe tokenConfig) } // TokenConfig holds the necessary configuration options for authorization and access tokens type TokenConfig struct { - // authorizeTokenMaxAgeSeconds defines the maximum age of authorize tokens - AuthorizeTokenMaxAgeSeconds int32 `json:"authorizeTokenMaxAgeSeconds"` // accessTokenMaxAgeSeconds defines the maximum age of access tokens AccessTokenMaxAgeSeconds int32 `json:"accessTokenMaxAgeSeconds"` + // accessTokenInactivityTimeoutSeconds defines the default token // inactivity timeout for tokens granted by any client. // The value represents the maximum amount of time that can occur between @@ -58,47 +61,68 @@ type TokenConfig struct { } const ( - // LoginTemplateKey is the default key of the login template + // LoginTemplateKey is the key of the login template in a secret LoginTemplateKey = "login.html" - // ProviderSelectionTemplateKey is the default key for the provider selection template + + // ProviderSelectionTemplateKey is the key for the provider selection template in a secret ProviderSelectionTemplateKey = "providers.html" - // ErrorsTemplateKey is the default key for the errors template + + // ErrorsTemplateKey is the key for the errors template in a secret ErrorsTemplateKey = "errors.html" + + // BindPasswordKey is the key for the LDAP bind password in a secret + BindPasswordKey = "bindPassword" + + // ClientSecretKey is the key for the oauth client secret data in a secret + ClientSecretKey = "clientSecret" + + // HTPasswdDataKey is the key for the htpasswd file data in a secret + HTPasswdDataKey = "htpasswd" ) // OAuthTemplates allow for customization of pages like the login page type OAuthTemplates struct { - // login is a reference to a secret that specifies a go template to use to render the login page. - // If a key is not specified, the key `login.html` is used to locate the template data. + // login is the name of a secret that specifies a go template to use to render the login page. + // The key "login.html" is used to locate the template data. + // If specified and the secret or expected key is not found, the default login page is used. + // If the specified template is not valid, the default login page is used. // If unspecified, the default login page is used. + // The namespace for this secret is openshift-config. // +optional - Login LocalSecretReference `json:"login,omitemtpy"` + Login SecretNameReference `json:"login,omitempty"` - // providerSelection is a reference to a secret that specifies a go template to use to render + // providerSelection is the name of a secret that specifies a go template to use to render // the provider selection page. - // If a key is not specified, the key `providers.html` is used to locate the template data. + // The key "providers.html" is used to locate the template data. + // If specified and the secret or expected key is not found, the default provider selection page is used. + // If the specified template is not valid, the default provider selection page is used. // If unspecified, the default provider selection page is used. + // The namespace for this secret is openshift-config. // +optional - ProviderSelection LocalSecretReference `json:"providerSelection,omitempty"` + ProviderSelection SecretNameReference `json:"providerSelection,omitempty"` - // error is a reference to a secret that specifies a go template to use to render error pages + // error is the name of a secret that specifies a go template to use to render error pages // during the authentication or grant flow. - // If a key is not specified, the key `errrors.html` is used to locate the template data. + // The key "errors.html" is used to locate the template data. + // If specified and the secret or expected key is not found, the default error page is used. + // If the specified template is not valid, the default error page is used. // If unspecified, the default error page is used. + // The namespace for this secret is openshift-config. // +optional - Error LocalSecretReference `json:"error,omitempty"` + Error SecretNameReference `json:"error,omitempty"` } -// OAuthIdentityProvider provides identities for users authenticating using credentials -type OAuthIdentityProvider struct { +// IdentityProvider provides identities for users authenticating using credentials +type IdentityProvider struct { // 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 vlid path segment: name cannot equal "." or ".." or contain "/" or "%" - // Ref: https://godoc.org/k8s.io/apimachinery/pkg/api/validation/path#ValidatePathSegmentName + // - It MUST be a valid path segment: name cannot equal "." or ".." or contain "/" or "%" or ":" + // 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"` @@ -107,18 +131,7 @@ type OAuthIdentityProvider struct { // +optional MappingMethod MappingMethodType `json:"mappingMethod"` - // grantMethod: allow, deny, prompt - // This method will be used only if the specific OAuth client doesn't provide a strategy - // of their own. Valid grant handling methods are: - // - auto: always approves grant requests, useful for trusted clients - // - prompt: prompts the end user for approval of grant requests, useful for third-party clients - // - deny: always denies grant requests, useful for black-listed clients - // Defaults to "prompt" if not set. - // +optional - GrantMethod GrantHandlerType `json:"grantMethod"` - - // IdentityProvidersConfig - ProviderConfig IdentityProviderConfig `json:",inline"` + IdentityProviderConfig `json:",inline"` } // MappingMethodType specifies how new identities should be mapped to users when they log in @@ -139,25 +152,6 @@ const ( // that user name already exists, the identity is mapped to the existing user, adding to any // existing identity mappings for the user. MappingMethodAdd MappingMethodType = "add" - - // MappingMethodGenerate provisions a user with the identity’s preferred user name. If a user - // with the preferred user name is already mapped to an existing identity, a unique user name is - // generated, e.g. myuser2. This method should not be used in combination with external - // processes that require exact matches between openshift user names and the idp user name - // such as LDAP group sync. - MappingMethodGenerate MappingMethodType = "generate" -) - -// GrantHandlerType are the valid strategies for handling grant requests -type GrantHandlerType string - -const ( - // GrantHandlerAuto auto-approves client authorization grant requests - GrantHandlerAuto GrantHandlerType = "auto" - // GrantHandlerPrompt prompts the user to approve new client authorization grant requests - GrantHandlerPrompt GrantHandlerType = "prompt" - // GrantHandlerDeny auto-denies client authorization grant requests - GrantHandlerDeny GrantHandlerType = "deny" ) type IdentityProviderType string @@ -166,24 +160,6 @@ const ( // IdentityProviderTypeBasicAuth provides identities for users authenticating with HTTP Basic Auth IdentityProviderTypeBasicAuth IdentityProviderType = "BasicAuth" - // IdentityProviderTypeAllowAll provides identities for all users authenticating using non-empty passwords - IdentityProviderTypeAllowAll IdentityProviderType = "AllowAll" - - // IdentityProviderTypeDenyAll provides no identities for users - IdentityProviderTypeDenyAll IdentityProviderType = "DenyAll" - - // IdentityProviderTypeHTPasswd provides identities from an HTPasswd file - IdentityProviderTypeHTPasswd IdentityProviderType = "HTPasswd" - - // IdentityProviderTypeLDAP provides identities for users authenticating using LDAP credentials - IdentityProviderTypeLDAP IdentityProviderType = "LDAP" - - // IdentityProviderTypeKeystone provides identitities for users authenticating using keystone password credentials - IdentityProviderTypeKeystone IdentityProviderType = "Keystone" - - // IdentityProviderTypeRequestHeader provides identities for users authenticating using request header credentials - IdentityProviderTypeRequestHeader IdentityProviderType = "RequestHeader" - // IdentityProviderTypeGitHub provides identities for users authenticating using GitHub credentials IdentityProviderTypeGitHub IdentityProviderType = "GitHub" @@ -193,8 +169,20 @@ const ( // IdentityProviderTypeGoogle provides identities for users authenticating using Google credentials IdentityProviderTypeGoogle IdentityProviderType = "Google" + // IdentityProviderTypeHTPasswd provides identities from an HTPasswd file + IdentityProviderTypeHTPasswd IdentityProviderType = "HTPasswd" + + // IdentityProviderTypeKeystone provides identitities for users authenticating using keystone password credentials + IdentityProviderTypeKeystone IdentityProviderType = "Keystone" + + // IdentityProviderTypeLDAP provides identities for users authenticating using LDAP credentials + IdentityProviderTypeLDAP IdentityProviderType = "LDAP" + // IdentityProviderTypeOpenID provides identities for users authenticating using OpenID credentials IdentityProviderTypeOpenID IdentityProviderType = "OpenID" + + // IdentityProviderTypeRequestHeader provides identities for users authenticating using request header credentials + IdentityProviderTypeRequestHeader IdentityProviderType = "RequestHeader" ) // IdentityProviderConfig contains configuration for using a specific identity provider @@ -204,111 +192,113 @@ type IdentityProviderConfig struct { // Provider-specific configuration // The json tag MUST match the `Type` specified above, case-insensitively - // e.g. For `Type: "LDAP"`, the `LDAPPasswordIdentityProvider` configuration should be provided + // e.g. For `Type: "LDAP"`, the `ldap` configuration should be provided // basicAuth contains configuration options for the BasicAuth IdP // +optional - BasicAuth *BasicAuthPasswordIdentityProvider `json:"basicAuth,omitempty"` + BasicAuth *BasicAuthIdentityProvider `json:"basicAuth,omitempty"` - // allowAll enables the AllowAllIdentityProvider which provides identities for users - // authenticating using non-empty passwords. - // Defaults to `false`, i.e. allowAll set to off + // github enables user authentication using GitHub credentials // +optional - AllowAll bool `json:"allowAll,omitempty"` + GitHub *GitHubIdentityProvider `json:"github,omitempty"` - // denyAll enables the DenyAllPasswordIdentityProvider which provides no identities for users - // Defaults to `false`, ie. denyAll set to off + // gitlab enables user authentication using GitLab credentials // +optional - DenyAll bool `json:"denyAll,omitempty"` + GitLab *GitLabIdentityProvider `json:"gitlab,omitempty"` - // htpasswd enables user authentication using an HTPasswd file to validate credentials + // google enables user authentication using Google credentials // +optional - HTPasswd *HTPasswdPasswordIdentityProvider `json:"htpasswd,omitempty"` + Google *GoogleIdentityProvider `json:"google,omitempty"` - // ldap enables user authentication using LDAP credentials + // htpasswd enables user authentication using an HTPasswd file to validate credentials // +optional - LDAP *LDAPPasswordIdentityProvider `json:"ldap,omitempty"` + HTPasswd *HTPasswdIdentityProvider `json:"htpasswd,omitempty"` // keystone enables user authentication using keystone password credentials // +optional - Keystone *KeystonePasswordIdentityProvider `json:"keystone,omitempty"` + Keystone *KeystoneIdentityProvider `json:"keystone,omitempty"` - // requestHeader enables user authentication using request header credentials - RequestHeader *RequestHeaderIdentityProvider `json:"requestHeader,omitempty"` - - // github enables user authentication using GitHub credentials - // +optional - GitHub *GitHubIdentityProvider `json:"github,omitempty"` - - // gitlab enables user authentication using GitLab credentials - // +optional - GitLab *GitLabIdentityProvider `json:"gitlab,omitempty"` - - // google enables user authentication using Google credentials + // ldap enables user authentication using LDAP credentials // +optional - Google *GoogleIdentityProvider `json:"google,omitempty"` + LDAP *LDAPIdentityProvider `json:"ldap,omitempty"` // openID enables user authentication using OpenID credentials // +optional OpenID *OpenIDIdentityProvider `json:"openID,omitempty"` + + // requestHeader enables user authentication using request header credentials + // +optional + RequestHeader *RequestHeaderIdentityProvider `json:"requestHeader,omitempty"` } // BasicAuthPasswordIdentityProvider provides identities for users authenticating using HTTP basic auth credentials -type BasicAuthPasswordIdentityProvider struct { +type BasicAuthIdentityProvider struct { // OAuthRemoteConnectionInfo contains information about how to connect to the external basic auth server OAuthRemoteConnectionInfo `json:",inline"` } -// RemoteConnectionInfo holds information necessary for establishing a remote connection +// OAuthRemoteConnectionInfo holds information necessary for establishing a remote connection type OAuthRemoteConnectionInfo struct { // url is the remote URL to connect to URL string `json:"url"` - // ca is a reference to a ConfigMap containing the CA for verifying TLS connections - CA ConfigMapReference `json:"ca"` - // tlsClientCert references a secret containing the TLS client certificate to present when - // connecting to the server. - // Looks under the key "tls.cert" for the data unless a lookup key is specified in the secret ref - TLSClientCert LocalSecretReference `json:"tlsClientCert"` + // 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. + // +optional + CA ConfigMapNameReference `json:"ca"` - // tlsClientKey references a secret containing the TLS private key for the client certificate - // Looks under the key "tls.key" for the data unless a lookup key is specified in the secret ref - TLSClientKey LocalSecretReference `json:"tlsClientKey"` -} + // tlsClientCert is an optional reference to a secret by name that contains the + // PEM-encoded TLS client certificate to present when connecting to the server. + // The key "tls.crt" is used to locate the data. + // If specified and the secret or expected key is not found, the identity provider is not honored. + // If the specified certificate data is not valid, the identity provider is not honored. + // The namespace for this secret is openshift-config. + // +optional + TLSClientCert SecretNameReference `json:"tlsClientCert"` -// HTPasswdDataKey is the default key for the htpasswd file data in a secret -const HTPasswdDataKey = "htpasswd" + // tlsClientKey is an optional reference to a secret by name that contains the + // PEM-encoded TLS private key for the client certificate referenced in tlsClientCert. + // The key "tls.key" is used to locate the data. + // If specified and the secret or expected key is not found, the identity provider is not honored. + // If the specified certificate data is not valid, the identity provider is not honored. + // The namespace for this secret is openshift-config. + // +optional + TLSClientKey SecretNameReference `json:"tlsClientKey"` +} // HTPasswdPasswordIdentityProvider provides identities for users authenticating using htpasswd credentials -type HTPasswdPasswordIdentityProvider struct { - // fileData is a reference to a secret containing the data to use as the htpasswd file - // Looks under the key `htpasswd` unless a lookup key is specified in the secret ref - FileData LocalSecretReference `json:"fileData"` +type HTPasswdIdentityProvider struct { + // fileData is a required reference to a secret by name containing the data to use as the htpasswd file. + // The key "htpasswd" is used to locate the data. + // If the secret or expected key is not found, the identity provider is not honored. + // If the specified htpasswd data is not valid, the identity provider is not honored. + // The namespace for this secret is openshift-config. + FileData SecretNameReference `json:"fileData"` } -const ( - // BindPasswordKey is default the key for the LDAP bind password in a secret - BindPasswordKey = "bindPassword" - // ClientSecretKey is the key for the oauth client secret data in a secret - ClientSecretKey = "clientSecret" -) - // LDAPPasswordIdentityProvider provides identities for users authenticating using LDAP credentials -type LDAPPasswordIdentityProvider struct { +type LDAPIdentityProvider struct { // url is an RFC 2255 URL which specifies the LDAP search parameters to use. // The syntax of the URL is: - // ldap://host:port/basedn?attribute?scope?filter + // ldap://host:port/basedn?attribute?scope?filter URL string `json:"url"` // bindDN is an optional DN to bind with during the search phase. // +optional BindDN string `json:"bindDN"` - // bindPassword is a reference to the secret containing an optional password to bind - // with during the search phase. - // Looks under the key `bindPassword` unless a lookup key is specified in the secret ref + // bindPassword is an optional reference to a secret by name + // containing a password to bind with during the search phase. + // The key "bindPassword" is used to locate the data. + // If specified and the secret or expected key is not found, the identity provider is not honored. + // The namespace for this secret is openshift-config. // +optional - BindPassword LocalSecretReference `json:"bindPassword"` + BindPassword SecretNameReference `json:"bindPassword"` // insecure, if true, indicates the connection should not use TLS // WARNING: Should not be set to `true` with the URL scheme "ldaps://" as "ldaps://" URLs always @@ -317,11 +307,15 @@ type LDAPPasswordIdentityProvider struct { // a TLS connection using StartTLS as specified in https://tools.ietf.org/html/rfc2830. Insecure bool `json:"insecure"` - // ca is a reference to a ConfigMap containing an optional trusted certificate authority bundle - // to use when making requests to the server. + // 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. // +optional - CA ConfigMapReference `json:"ca"` + CA ConfigMapNameReference `json:"ca"` // attributes maps LDAP attributes to identities Attributes LDAPAttributeMapping `json:"attributes"` @@ -334,15 +328,18 @@ type LDAPAttributeMapping struct { // attribute have a value, authentication fails. // LDAP standard identity attribute is "dn" ID []string `json:"id"` + // preferredUsername is the list of attributes whose values should be used as the preferred username. // LDAP standard login attribute is "uid" // +optional PreferredUsername []string `json:"preferredUsername"` + // name is the list of attributes whose values should be used as the display name. Optional. // If unspecified, no display name is set for the identity // LDAP standard display name attribute is "cn" // +optional Name []string `json:"name"` + // email is the list of attributes whose values should be used as the email address. Optional. // If unspecified, no email is set for the identity // +optional @@ -350,15 +347,18 @@ type LDAPAttributeMapping struct { } // KeystonePasswordIdentityProvider provides identities for users authenticating using keystone password credentials -type KeystonePasswordIdentityProvider struct { +type KeystoneIdentityProvider struct { // OAuthRemoteConnectionInfo contains information about how to connect to the keystone server OAuthRemoteConnectionInfo `json:",inline"` + // domainName is required for keystone v3 DomainName string `json:"domainName"` - // useKeystoneIdentity flag indicates that user should be authenticated by username, not keystone ID - // DEPRECATED - only use this option for legacy systems to ensure backwards compatibiity + + // TODO if we ever add support for 3.11 to 4.0 upgrades, add this configuration + // useUsernameIdentity indicates that users should be authenticated by username, not keystone ID + // DEPRECATED - only use this option for legacy systems to ensure backwards compatibility // +optional - LegacyLookupByUsername bool `json:"useKeystoneIdentity"` + // UseUsernameIdentity bool `json:"useUsernameIdentity"` } // RequestHeaderIdentityProvider provides identities for users authenticating using request header credentials @@ -369,7 +369,7 @@ type RequestHeaderIdentityProvider struct { // https://www.example.com/sso-login?then=${url} // ${query} is replaced with the current query string // https://www.example.com/auth-proxy/oauth/authorize?${query} - // Required when UseAsLogin is set to true. + // Required when login is set to true. LoginURL string `json:"loginURL"` // challengeURL is a URL to redirect unauthenticated /authorize requests to @@ -379,14 +379,17 @@ type RequestHeaderIdentityProvider struct { // https://www.example.com/sso-login?then=${url} // ${query} is replaced with the current query string // https://www.example.com/auth-proxy/oauth/authorize?${query} - // Required when UseAsChallenger is set to true. + // Required when challenge is set to true. ChallengeURL string `json:"challengeURL"` - // clientCA is a reference to a configmap with the trusted signer certs. If empty, no request - // verification is done, and any direct request to the OAuth server can impersonate any identity - // from this provider, merely by setting a request header. - // +optional - ClientCA ConfigMapReference `json:"ca"` + // ca is a required 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. + // Specifically, it allows verification of incoming requests to prevent header spoofing. + // The key "ca.crt" is used to locate the data. + // If 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. + // The namespace for this config map is openshift-config. + ClientCA ConfigMapNameReference `json:"ca"` // clientCommonNames is an optional list of common names to require a match from. If empty, any // client certificate validated against the clientCA bundle is considered authoritative. @@ -411,9 +414,11 @@ type GitHubIdentityProvider struct { // clientID is the oauth client ID ClientID string `json:"clientID"` - // clientSecret is is a reference to the secret containing the oauth client secret - // The secret referenced must contain a key named `clientSecret` containing the secret data. - ClientSecret LocalSecretReference `json:"clientSecret"` + // clientSecret is a required reference to the secret by name containing the oauth client secret. + // The key "clientSecret" is used to locate the data. + // If the secret or expected key is not found, the identity provider is not honored. + // The namespace for this secret is openshift-config. + ClientSecret SecretNameReference `json:"clientSecret"` // organizations optionally restricts which organizations are allowed to log in // +optional @@ -429,35 +434,41 @@ type GitHubIdentityProvider struct { // +optional Hostname string `json:"hostname"` - // ca is a reference to a ConfigMap containing an optional trusted certificate authority bundle - // to use when making requests to the server. + // 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. // This can only be configured when hostname is set to a non-empty value. + // The namespace for this config map is openshift-config. // +optional - CA ConfigMapReference `json:"ca"` + CA ConfigMapNameReference `json:"ca"` } // GitLabIdentityProvider provides identities for users authenticating using GitLab credentials type GitLabIdentityProvider struct { - // ca is a reference to a ConfigMap containing an optional trusted certificate authority bundle - // to use when making requests to the server. - // If empty, the default system roots are used. - // +optional - CA ConfigMapReference `json:"ca"` - - // url is the oauth server base URL - URL string `json:"url"` - // clientID is the oauth client ID ClientID string `json:"clientID"` - // clientSecret is is a reference to the secret containing the oauth client secret - // The secret referenced must contain a key named `clientSecret` containing the secret data. - ClientSecret LocalSecretReference `json:"clientSecret"` + // clientSecret is a required reference to the secret by name containing the oauth client secret. + // The key "clientSecret" is used to locate the data. + // If the secret or expected key is not found, the identity provider is not honored. + // The namespace for this secret is openshift-config. + ClientSecret SecretNameReference `json:"clientSecret"` - // legacy determines that OAuth2 should be used, not OIDC + // url is the oauth server base URL + URL string `json:"url"` + + // 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. // +optional - LegacyOAuth2 bool `json:"legacy,omitempty"` + CA ConfigMapNameReference `json:"ca"` } // GoogleIdentityProvider provides identities for users authenticating using Google credentials @@ -465,9 +476,11 @@ type GoogleIdentityProvider struct { // clientID is the oauth client ID ClientID string `json:"clientID"` - // clientSecret is is a reference to the secret containing the oauth client secret - // The secret referenced must contain a key named `clientSecret` containing the secret data. - ClientSecret LocalSecretReference `json:"clientSecret"` + // clientSecret is a required reference to the secret by name containing the oauth client secret. + // The key "clientSecret" is used to locate the data. + // If the secret or expected key is not found, the identity provider is not honored. + // The namespace for this secret is openshift-config. + ClientSecret SecretNameReference `json:"clientSecret"` // hostedDomain is the optional Google App domain (e.g. "mycompany.com") to restrict logins to // +optional @@ -476,18 +489,24 @@ type GoogleIdentityProvider struct { // OpenIDIdentityProvider provides identities for users authenticating using OpenID credentials type OpenIDIdentityProvider struct { - // ca is a reference to a ConfigMap containing an optional trusted certificate authority bundle - // to use when making requests to the server. - // If empty, the default system roots are used. - // +optional - CA ConfigMapReference `json:"ca"` - // clientID is the oauth client ID ClientID string `json:"clientID"` - // clientSecret is is a reference to the secret containing the oauth client secret - // The secret referenced must contain a key named `clientSecret` containing the secret data. - ClientSecret LocalSecretReference `json:"clientSecret"` + // clientSecret is a required reference to the secret by name containing the oauth client secret. + // The key "clientSecret" is used to locate the data. + // If the secret or expected key is not found, the identity provider is not honored. + // The namespace for this secret is openshift-config. + ClientSecret SecretNameReference `json:"clientSecret"` + + // 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. + // +optional + CA ConfigMapNameReference `json:"ca"` // extraScopes are any scopes to request in addition to the standard "openid" scope. // +optional @@ -508,8 +527,10 @@ type OpenIDIdentityProvider struct { 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 @@ -517,7 +538,7 @@ type OpenIDURLs struct { UserInfo string `json:"userInfo"` } -// UserIDClaim is used in the `ID` field for an `OpenIDClaim` +// 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 // rely upon as a stable identifier for the End-User, since the sub Claim MUST be locally unique @@ -529,13 +550,15 @@ const UserIDClaim = "sub" // OpenIDClaims contains a list of OpenID claims to use when authenticating with an OpenID identity provider type OpenIDClaims struct { // preferredUsername is the list of claims whose values should be used as the preferred username. - // If unspecified, the preferred username is determined from the value of the id claim + // If unspecified, the preferred username is determined from the value of the sub claim // +optional PreferredUsername []string `json:"preferredUsername"` + // name is the list of claims whose values should be used as the display name. Optional. // If unspecified, no display name is set for the identity // +optional Name []string `json:"name"` + // email is the list of claims whose values should be used as the email address. Optional. // If unspecified, no email is set for the identity // +optional @@ -543,8 +566,10 @@ type OpenIDClaims struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + type OAuthList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []OAuth `json:"items"` + + Items []OAuth `json:"items"` } diff --git a/vendor/github.com/openshift/api/config/v1/types_project.go b/vendor/github.com/openshift/api/config/v1/types_project.go index 4280614fbff..783288fc250 100644 --- a/vendor/github.com/openshift/api/config/v1/types_project.go +++ b/vendor/github.com/openshift/api/config/v1/types_project.go @@ -7,7 +7,6 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // Project holds cluster-wide information about Project. The canonical name is `cluster` -// TODO this object is an example of a possible grouping and is subject to change or removal type Project struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -19,9 +18,24 @@ type Project struct { Status ProjectStatus `json:"status"` } +// TemplateReference references a template in a specific namespace. +// The namespace must be specified at the point of use. +type TemplateReference struct { + // name is the metadata.name of the referenced project request template + Name string `json:"name"` +} + +// ProjectSpec holds the project creation configuration. type ProjectSpec struct { - // project request message - // project request template + // projectRequestMessage is the string presented to a user if they are unable to request a project via the projectrequest api endpoint + ProjectRequestMessage string `json:"projectRequestMessage"` + + // projectRequestTemplate is the template to use for creating projects in response to projectrequest. + // This must point to a template in 'openshift-config' namespace. It is optional. + // If it is not specified, a default template is used. + // + // +optional + ProjectRequestTemplate TemplateReference `json:"projectRequestTemplate,omitempty"` } type ProjectStatus struct { diff --git a/vendor/github.com/openshift/api/config/v1/types_proxy.go b/vendor/github.com/openshift/api/config/v1/types_proxy.go new file mode 100644 index 00000000000..9ca18416b2a --- /dev/null +++ b/vendor/github.com/openshift/api/config/v1/types_proxy.go @@ -0,0 +1,37 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Proxy holds cluster-wide information on how to configure default proxies for the cluster. The canonical name is `cluster` +type Proxy struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // Spec holds user-settable values for the proxy configuration + Spec ProxySpec `json:"spec"` +} + +type ProxySpec struct { + // httpProxy is the URL of the proxy for HTTP requests. Empty means unset and will not result in an env var. + HTTPProxy string `json:"httpProxy,omitempty"` + + // httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var. + HTTPSProxy string `json:"httpsProxy,omitempty"` + + // noProxy is the list of domains for which the proxy should not be used. Empty means unset and will not result in an env var. + NoProxy string `json:"noProxy,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ProxyList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + metav1.ListMeta `json:"metadata,omitempty"` + Items []Proxy `json:"items"` +} 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 603ed905448..3cf135bdb08 100644 --- a/vendor/github.com/openshift/api/config/v1/types_scheduling.go +++ b/vendor/github.com/openshift/api/config/v1/types_scheduling.go @@ -7,7 +7,6 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // Scheduling holds cluster-wide information about Scheduling. The canonical name is `cluster` -// TODO this object is an example of a possible grouping and is subject to change or removal type Scheduling struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -20,7 +19,12 @@ type Scheduling struct { } type SchedulingSpec struct { - // default node selector (I would be happy to see this die....) + // 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. + // +optional + Policy ConfigMapNameReference `json:"policy,omitempty"` } type SchedulingStatus struct { diff --git a/vendor/github.com/openshift/api/config/v1/types_swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1/types_swagger_doc_generated.go deleted file mode 100644 index 55b534c2e12..00000000000 --- a/vendor/github.com/openshift/api/config/v1/types_swagger_doc_generated.go +++ /dev/null @@ -1,228 +0,0 @@ -package v1 - -// This file contains a collection of methods that can be used from go-restful to -// generate Swagger API documentation for its models. Please read this PR for more -// information on the implementation: https://github.com/emicklei/go-restful/pull/215 -// -// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if -// they are on one line! For multiple line or blocks that you want to ignore use ---. -// Any context after a --- is ignored. -// -// Those methods can be generated by using hack/update-generated-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_AdmissionPluginConfig = map[string]string{ - "": "AdmissionPluginConfig holds the necessary configuration options for admission plugins", - "location": "Location is the path to a configuration file that contains the plugin's configuration", - "configuration": "Configuration is an embedded configuration object to be used as the plugin's configuration. If present, it will be used instead of the path to the configuration file.", -} - -func (AdmissionPluginConfig) SwaggerDoc() map[string]string { - return map_AdmissionPluginConfig -} - -var map_AuditConfig = map[string]string{ - "": "AuditConfig holds configuration for the audit capabilities", - "enabled": "If this flag is set, audit log will be printed in the logs. The logs contains, method, user and a requested URL.", - "auditFilePath": "All requests coming to the apiserver will be logged to this file.", - "maximumFileRetentionDays": "Maximum number of days to retain old log files based on the timestamp encoded in their filename.", - "maximumRetainedFiles": "Maximum number of old log files to retain.", - "maximumFileSizeMegabytes": "Maximum size in megabytes of the log file before it gets rotated. Defaults to 100MB.", - "policyFile": "PolicyFile is a path to the file that defines the audit policy configuration.", - "policyConfiguration": "PolicyConfiguration is an embedded policy configuration object to be used as the audit policy configuration. If present, it will be used instead of the path to the policy file.", - "logFormat": "Format of saved audits (legacy or json).", - "webHookKubeConfig": "Path to a .kubeconfig formatted file that defines the audit webhook configuration.", - "webHookMode": "Strategy for sending audit events (block or batch).", -} - -func (AuditConfig) SwaggerDoc() map[string]string { - return map_AuditConfig -} - -var map_CertInfo = map[string]string{ - "": "CertInfo relates a certificate with a private key", - "certFile": "CertFile is a file containing a PEM-encoded certificate", - "keyFile": "KeyFile is a file containing a PEM-encoded private key for the certificate specified by CertFile", -} - -func (CertInfo) SwaggerDoc() map[string]string { - return map_CertInfo -} - -var map_ClientConnectionOverrides = map[string]string{ - "acceptContentTypes": "acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the default value of 'application/json'. This field will control all connections to the server used by a particular client.", - "contentType": "contentType is the content type used when sending data to the server from this client.", - "qps": "qps controls the number of queries per second allowed for this connection.", - "burst": "burst allows extra queries to accumulate when a client is exceeding its rate.", -} - -func (ClientConnectionOverrides) SwaggerDoc() map[string]string { - return map_ClientConnectionOverrides -} - -var map_ConfigMapReference = map[string]string{ - "": "ConfigMapReference references a configmap in the openshift-config namespace.", - "filename": "Key allows pointing to a specific key/value inside of the configmap. This is useful for logical file references.", -} - -func (ConfigMapReference) SwaggerDoc() map[string]string { - return map_ConfigMapReference -} - -var map_DelegatedAuthentication = map[string]string{ - "": "DelegatedAuthentication allows authentication to be disabled.", - "disabled": "disabled indicates that authentication should be disabled. By default it will use delegated authentication.", -} - -func (DelegatedAuthentication) SwaggerDoc() map[string]string { - return map_DelegatedAuthentication -} - -var map_DelegatedAuthorization = map[string]string{ - "": "DelegatedAuthorization allows authorization to be disabled.", - "disabled": "disabled indicates that authorization should be disabled. By default it will use delegated authorization.", -} - -func (DelegatedAuthorization) SwaggerDoc() map[string]string { - return map_DelegatedAuthorization -} - -var map_EtcdConnectionInfo = map[string]string{ - "": "EtcdConnectionInfo holds information necessary for connecting to an etcd server", - "urls": "URLs are the URLs for etcd", - "ca": "CA is a file containing trusted roots for the etcd server certificates", -} - -func (EtcdConnectionInfo) SwaggerDoc() map[string]string { - return map_EtcdConnectionInfo -} - -var map_EtcdStorageConfig = map[string]string{ - "storagePrefix": "StoragePrefix is the path within etcd that the OpenShift resources will be rooted under. This value, if changed, will mean existing objects in etcd will no longer be located.", -} - -func (EtcdStorageConfig) SwaggerDoc() map[string]string { - return map_EtcdStorageConfig -} - -var map_GenericAPIServerConfig = map[string]string{ - "": "GenericAPIServerConfig is an inline-able struct for aggregated apiservers that need to store data in etcd", - "servingInfo": "ServingInfo describes how to start serving", - "corsAllowedOrigins": "CORSAllowedOrigins", - "auditConfig": "AuditConfig describes how to configure audit information", - "storageConfig": "StorageConfig contains information about how to use", -} - -func (GenericAPIServerConfig) SwaggerDoc() map[string]string { - return map_GenericAPIServerConfig -} - -var map_GenericControllerConfig = map[string]string{ - "": "GenericControllerConfig provides information to configure a controller", - "servingInfo": "ServingInfo is the HTTP serving information for the controller's endpoints", - "leaderElection": "leaderElection provides information to elect a leader. Only override this if you have a specific need", - "authentication": "authentication allows configuration of authentication for the endpoints", - "authorization": "authorization allows configuration of authentication for the endpoints", -} - -func (GenericControllerConfig) SwaggerDoc() map[string]string { - return map_GenericControllerConfig -} - -var map_HTTPServingInfo = map[string]string{ - "": "HTTPServingInfo holds configuration for serving HTTP", - "maxRequestsInFlight": "MaxRequestsInFlight is the number of concurrent requests allowed to the server. If zero, no limit.", - "requestTimeoutSeconds": "RequestTimeoutSeconds is the number of seconds before requests are timed out. The default is 60 minutes, if -1 there is no limit on requests.", -} - -func (HTTPServingInfo) SwaggerDoc() map[string]string { - return map_HTTPServingInfo -} - -var map_KubeClientConfig = map[string]string{ - "kubeConfig": "kubeConfig is a .kubeconfig filename for going to the owning kube-apiserver. Empty uses an in-cluster-config", - "connectionOverrides": "connectionOverrides specifies client overrides for system components to loop back to this master.", -} - -func (KubeClientConfig) SwaggerDoc() map[string]string { - return map_KubeClientConfig -} - -var map_LeaderElection = map[string]string{ - "": "LeaderElection provides information to elect a leader", - "disable": "disable allows leader election to be suspended while allowing a fully defaulted \"normal\" startup case.", - "namespace": "namespace indicates which namespace the resource is in", - "name": "name indicates what name to use for the resource", - "leaseDuration": "leaseDuration is the duration that non-leader candidates will wait after observing a leadership renewal until attempting to acquire leadership of a led but unrenewed leader slot. This is effectively the maximum duration that a leader can be stopped before it is replaced by another candidate. This is only applicable if leader election is enabled.", - "renewDeadline": "renewDeadline is the interval between attempts by the acting master to renew a leadership slot before it stops leading. This must be less than or equal to the lease duration. This is only applicable if leader election is enabled.", - "retryPeriod": "retryPeriod is the duration the clients should wait between attempting acquisition and renewal of a leadership. This is only applicable if leader election is enabled.", -} - -func (LeaderElection) SwaggerDoc() map[string]string { - return map_LeaderElection -} - -var map_LocalSecretReference = map[string]string{ - "": "LocalSecretReference references a secret within the local namespace", - "name": "Name of the secret in the local namespace", - "key": "Key selects a specific key within the local secret. Must be a valid secret key.", -} - -func (LocalSecretReference) SwaggerDoc() map[string]string { - return map_LocalSecretReference -} - -var map_NamedCertificate = map[string]string{ - "": "NamedCertificate specifies a certificate/key, and the names it should be served for", - "names": "Names is a list of DNS names this certificate should be used to secure A name can be a normal DNS name, or can contain leading wildcard segments.", -} - -func (NamedCertificate) SwaggerDoc() map[string]string { - return map_NamedCertificate -} - -var map_RemoteConnectionInfo = map[string]string{ - "": "RemoteConnectionInfo holds information necessary for establishing a remote connection", - "url": "URL is the remote URL to connect to", - "ca": "CA is the CA for verifying TLS connections", -} - -func (RemoteConnectionInfo) SwaggerDoc() map[string]string { - return map_RemoteConnectionInfo -} - -var map_ServingInfo = map[string]string{ - "": "ServingInfo holds information about serving web pages", - "bindAddress": "BindAddress is the ip:port to serve on", - "bindNetwork": "BindNetwork is the type of network to bind to - defaults to \"tcp4\", accepts \"tcp\", \"tcp4\", and \"tcp6\"", - "clientCA": "ClientCA is the certificate bundle for all the signers that you'll recognize for incoming client certificates", - "namedCertificates": "NamedCertificates is a list of certificates to use to secure requests to specific hostnames", - "minTLSVersion": "MinTLSVersion is the minimum TLS version supported. Values must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants", - "cipherSuites": "CipherSuites contains an overridden list of ciphers for the server to support. Values must match cipher suite IDs from https://golang.org/pkg/crypto/tls/#pkg-constants", -} - -func (ServingInfo) SwaggerDoc() map[string]string { - return map_ServingInfo -} - -var map_StringSource = map[string]string{ - "": "StringSource allows specifying a string inline, or externally via env var or file. When it contains only a string value, it marshals to a simple JSON string.", -} - -func (StringSource) SwaggerDoc() map[string]string { - return map_StringSource -} - -var map_StringSourceSpec = map[string]string{ - "": "StringSourceSpec specifies a string value, or external location", - "value": "Value specifies the cleartext value, or an encrypted value if keyFile is specified.", - "env": "Env specifies an envvar containing the cleartext value, or an encrypted value if the keyFile is specified.", - "file": "File references a file containing the cleartext value, or an encrypted value if a keyFile is specified.", - "keyFile": "KeyFile references a file containing the key to use to decrypt the value.", -} - -func (StringSourceSpec) SwaggerDoc() map[string]string { - return map_StringSourceSpec -} - -// AUTO-GENERATED FUNCTIONS END HERE 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 e0fed9683ed..c5b072aa135 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 @@ -9,6 +9,147 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIServer) DeepCopyInto(out *APIServer) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServer. +func (in *APIServer) DeepCopy() *APIServer { + if in == nil { + return nil + } + out := new(APIServer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *APIServer) 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 *APIServerList) DeepCopyInto(out *APIServerList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]APIServer, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServerList. +func (in *APIServerList) DeepCopy() *APIServerList { + if in == nil { + return nil + } + out := new(APIServerList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *APIServerList) 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 *APIServerNamedServingCert) DeepCopyInto(out *APIServerNamedServingCert) { + *out = *in + if in.Names != nil { + in, out := &in.Names, &out.Names + *out = make([]string, len(*in)) + copy(*out, *in) + } + out.ServingCertificate = in.ServingCertificate + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServerNamedServingCert. +func (in *APIServerNamedServingCert) DeepCopy() *APIServerNamedServingCert { + if in == nil { + return nil + } + out := new(APIServerNamedServingCert) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIServerServingCerts) DeepCopyInto(out *APIServerServingCerts) { + *out = *in + out.DefaultServingCertificate = in.DefaultServingCertificate + if in.NamedCertificates != nil { + in, out := &in.NamedCertificates, &out.NamedCertificates + *out = make([]APIServerNamedServingCert, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServerServingCerts. +func (in *APIServerServingCerts) DeepCopy() *APIServerServingCerts { + if in == nil { + return nil + } + out := new(APIServerServingCerts) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIServerSpec) DeepCopyInto(out *APIServerSpec) { + *out = *in + in.ServingCerts.DeepCopyInto(&out.ServingCerts) + out.ClientCA = in.ClientCA + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServerSpec. +func (in *APIServerSpec) DeepCopy() *APIServerSpec { + if in == nil { + return nil + } + out := new(APIServerSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIServerStatus) DeepCopyInto(out *APIServerStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServerStatus. +func (in *APIServerStatus) DeepCopy() *APIServerStatus { + if in == nil { + return nil + } + out := new(APIServerStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AdmissionPluginConfig) DeepCopyInto(out *AdmissionPluginConfig) { *out = *in @@ -129,7 +270,7 @@ func (in *AuthenticationSpec) DeepCopy() *AuthenticationSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AuthenticationStatus) DeepCopyInto(out *AuthenticationStatus) { *out = *in - out.OAuthMetadata = in.OAuthMetadata + out.IntegratedOAuthMetadata = in.IntegratedOAuthMetadata return } @@ -144,18 +285,18 @@ func (in *AuthenticationStatus) DeepCopy() *AuthenticationStatus { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BasicAuthPasswordIdentityProvider) DeepCopyInto(out *BasicAuthPasswordIdentityProvider) { +func (in *BasicAuthIdentityProvider) DeepCopyInto(out *BasicAuthIdentityProvider) { *out = *in out.OAuthRemoteConnectionInfo = in.OAuthRemoteConnectionInfo return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicAuthPasswordIdentityProvider. -func (in *BasicAuthPasswordIdentityProvider) DeepCopy() *BasicAuthPasswordIdentityProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicAuthIdentityProvider. +func (in *BasicAuthIdentityProvider) DeepCopy() *BasicAuthIdentityProvider { if in == nil { return nil } - out := new(BasicAuthPasswordIdentityProvider) + out := new(BasicAuthIdentityProvider) in.DeepCopyInto(out) return out } @@ -195,7 +336,7 @@ func (in *BuildDefaults) DeepCopyInto(out *BuildDefaults) { if *in == nil { *out = nil } else { - *out = new(ProxyConfig) + *out = new(ProxySpec) **out = **in } } @@ -204,7 +345,7 @@ func (in *BuildDefaults) DeepCopyInto(out *BuildDefaults) { if *in == nil { *out = nil } else { - *out = new(ProxyConfig) + *out = new(ProxySpec) **out = **in } } @@ -221,6 +362,7 @@ func (in *BuildDefaults) DeepCopyInto(out *BuildDefaults) { copy(*out, *in) } in.Resources.DeepCopyInto(&out.Resources) + in.RegistriesConfig.DeepCopyInto(&out.RegistriesConfig) return } @@ -275,7 +417,13 @@ func (in *BuildOverrides) DeepCopyInto(out *BuildOverrides) { *out = make([]ImageLabel, len(*in)) copy(*out, *in) } - in.NodeSelector.DeepCopyInto(&out.NodeSelector) + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } if in.Tolerations != nil { in, out := &in.Tolerations, &out.Tolerations *out = make([]core_v1.Toleration, len(*in)) @@ -450,6 +598,16 @@ func (in *ClusterOperatorStatus) DeepCopyInto(out *ClusterOperatorStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = make([]OperandVersion, len(*in)) + copy(*out, *in) + } + if in.RelatedObjects != nil { + in, out := &in.RelatedObjects, &out.RelatedObjects + *out = make([]ObjectReference, len(*in)) + copy(*out, *in) + } in.Extension.DeepCopyInto(&out.Extension) return } @@ -625,17 +783,33 @@ func (in *ComponentOverride) DeepCopy() *ComponentOverride { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigMapReference) DeepCopyInto(out *ConfigMapReference) { +func (in *ConfigMapFileReference) DeepCopyInto(out *ConfigMapFileReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapFileReference. +func (in *ConfigMapFileReference) DeepCopy() *ConfigMapFileReference { + if in == nil { + return nil + } + out := new(ConfigMapFileReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConfigMapNameReference) DeepCopyInto(out *ConfigMapNameReference) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapReference. -func (in *ConfigMapReference) DeepCopy() *ConfigMapReference { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapNameReference. +func (in *ConfigMapNameReference) DeepCopy() *ConfigMapNameReference { if in == nil { return nil } - out := new(ConfigMapReference) + out := new(ConfigMapNameReference) in.DeepCopyInto(out) return out } @@ -982,8 +1156,8 @@ func (in *GitHubIdentityProvider) DeepCopy() *GitHubIdentityProvider { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GitLabIdentityProvider) DeepCopyInto(out *GitLabIdentityProvider) { *out = *in - out.CA = in.CA out.ClientSecret = in.ClientSecret + out.CA = in.CA return } @@ -1015,18 +1189,18 @@ func (in *GoogleIdentityProvider) DeepCopy() *GoogleIdentityProvider { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HTPasswdPasswordIdentityProvider) DeepCopyInto(out *HTPasswdPasswordIdentityProvider) { +func (in *HTPasswdIdentityProvider) DeepCopyInto(out *HTPasswdIdentityProvider) { *out = *in out.FileData = in.FileData return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTPasswdPasswordIdentityProvider. -func (in *HTPasswdPasswordIdentityProvider) DeepCopy() *HTPasswdPasswordIdentityProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTPasswdIdentityProvider. +func (in *HTPasswdIdentityProvider) DeepCopy() *HTPasswdIdentityProvider { if in == nil { return nil } - out := new(HTPasswdPasswordIdentityProvider) + out := new(HTPasswdIdentityProvider) in.DeepCopyInto(out) return out } @@ -1051,10 +1225,7 @@ func (in *HTTPServingInfo) DeepCopy() *HTTPServingInfo { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IdentityProvider) DeepCopyInto(out *IdentityProvider) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status + in.IdentityProviderConfig.DeepCopyInto(&out.IdentityProviderConfig) return } @@ -1068,14 +1239,6 @@ func (in *IdentityProvider) DeepCopy() *IdentityProvider { return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IdentityProvider) 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 *IdentityProviderConfig) DeepCopyInto(out *IdentityProviderConfig) { *out = *in @@ -1084,71 +1247,62 @@ func (in *IdentityProviderConfig) DeepCopyInto(out *IdentityProviderConfig) { if *in == nil { *out = nil } else { - *out = new(BasicAuthPasswordIdentityProvider) - **out = **in - } - } - if in.HTPasswd != nil { - in, out := &in.HTPasswd, &out.HTPasswd - if *in == nil { - *out = nil - } else { - *out = new(HTPasswdPasswordIdentityProvider) + *out = new(BasicAuthIdentityProvider) **out = **in } } - if in.LDAP != nil { - in, out := &in.LDAP, &out.LDAP + if in.GitHub != nil { + in, out := &in.GitHub, &out.GitHub if *in == nil { *out = nil } else { - *out = new(LDAPPasswordIdentityProvider) + *out = new(GitHubIdentityProvider) (*in).DeepCopyInto(*out) } } - if in.Keystone != nil { - in, out := &in.Keystone, &out.Keystone + if in.GitLab != nil { + in, out := &in.GitLab, &out.GitLab if *in == nil { *out = nil } else { - *out = new(KeystonePasswordIdentityProvider) + *out = new(GitLabIdentityProvider) **out = **in } } - if in.RequestHeader != nil { - in, out := &in.RequestHeader, &out.RequestHeader + if in.Google != nil { + in, out := &in.Google, &out.Google if *in == nil { *out = nil } else { - *out = new(RequestHeaderIdentityProvider) - (*in).DeepCopyInto(*out) + *out = new(GoogleIdentityProvider) + **out = **in } } - if in.GitHub != nil { - in, out := &in.GitHub, &out.GitHub + if in.HTPasswd != nil { + in, out := &in.HTPasswd, &out.HTPasswd if *in == nil { *out = nil } else { - *out = new(GitHubIdentityProvider) - (*in).DeepCopyInto(*out) + *out = new(HTPasswdIdentityProvider) + **out = **in } } - if in.GitLab != nil { - in, out := &in.GitLab, &out.GitLab + if in.Keystone != nil { + in, out := &in.Keystone, &out.Keystone if *in == nil { *out = nil } else { - *out = new(GitLabIdentityProvider) + *out = new(KeystoneIdentityProvider) **out = **in } } - if in.Google != nil { - in, out := &in.Google, &out.Google + if in.LDAP != nil { + in, out := &in.LDAP, &out.LDAP if *in == nil { *out = nil } else { - *out = new(GoogleIdentityProvider) - **out = **in + *out = new(LDAPIdentityProvider) + (*in).DeepCopyInto(*out) } } if in.OpenID != nil { @@ -1160,6 +1314,15 @@ func (in *IdentityProviderConfig) DeepCopyInto(out *IdentityProviderConfig) { (*in).DeepCopyInto(*out) } } + if in.RequestHeader != nil { + in, out := &in.RequestHeader, &out.RequestHeader + if *in == nil { + *out = nil + } else { + *out = new(RequestHeaderIdentityProvider) + (*in).DeepCopyInto(*out) + } + } return } @@ -1173,71 +1336,6 @@ func (in *IdentityProviderConfig) DeepCopy() *IdentityProviderConfig { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IdentityProviderList) DeepCopyInto(out *IdentityProviderList) { - *out = *in - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]IdentityProvider, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentityProviderList. -func (in *IdentityProviderList) DeepCopy() *IdentityProviderList { - if in == nil { - return nil - } - out := new(IdentityProviderList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IdentityProviderList) 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 *IdentityProviderSpec) DeepCopyInto(out *IdentityProviderSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentityProviderSpec. -func (in *IdentityProviderSpec) DeepCopy() *IdentityProviderSpec { - if in == nil { - return nil - } - out := new(IdentityProviderSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IdentityProviderStatus) DeepCopyInto(out *IdentityProviderStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentityProviderStatus. -func (in *IdentityProviderStatus) DeepCopy() *IdentityProviderStatus { - if in == nil { - return nil - } - out := new(IdentityProviderStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Image) DeepCopyInto(out *Image) { *out = *in @@ -1550,18 +1648,18 @@ func (in *IngressStatus) DeepCopy() *IngressStatus { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KeystonePasswordIdentityProvider) DeepCopyInto(out *KeystonePasswordIdentityProvider) { +func (in *KeystoneIdentityProvider) DeepCopyInto(out *KeystoneIdentityProvider) { *out = *in out.OAuthRemoteConnectionInfo = in.OAuthRemoteConnectionInfo return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeystonePasswordIdentityProvider. -func (in *KeystonePasswordIdentityProvider) DeepCopy() *KeystonePasswordIdentityProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeystoneIdentityProvider. +func (in *KeystoneIdentityProvider) DeepCopy() *KeystoneIdentityProvider { if in == nil { return nil } - out := new(KeystonePasswordIdentityProvider) + out := new(KeystoneIdentityProvider) in.DeepCopyInto(out) return out } @@ -1620,7 +1718,7 @@ func (in *LDAPAttributeMapping) DeepCopy() *LDAPAttributeMapping { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LDAPPasswordIdentityProvider) DeepCopyInto(out *LDAPPasswordIdentityProvider) { +func (in *LDAPIdentityProvider) DeepCopyInto(out *LDAPIdentityProvider) { *out = *in out.BindPassword = in.BindPassword out.CA = in.CA @@ -1628,12 +1726,12 @@ func (in *LDAPPasswordIdentityProvider) DeepCopyInto(out *LDAPPasswordIdentityPr return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LDAPPasswordIdentityProvider. -func (in *LDAPPasswordIdentityProvider) DeepCopy() *LDAPPasswordIdentityProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LDAPIdentityProvider. +func (in *LDAPIdentityProvider) DeepCopy() *LDAPIdentityProvider { if in == nil { return nil } - out := new(LDAPPasswordIdentityProvider) + out := new(LDAPIdentityProvider) in.DeepCopyInto(out) return out } @@ -1657,22 +1755,6 @@ func (in *LeaderElection) DeepCopy() *LeaderElection { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LocalSecretReference) DeepCopyInto(out *LocalSecretReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalSecretReference. -func (in *LocalSecretReference) DeepCopy() *LocalSecretReference { - if in == nil { - return nil - } - out := new(LocalSecretReference) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NamedCertificate) DeepCopyInto(out *NamedCertificate) { *out = *in @@ -1836,23 +1918,6 @@ func (in *OAuth) DeepCopyObject() runtime.Object { return nil } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OAuthIdentityProvider) DeepCopyInto(out *OAuthIdentityProvider) { - *out = *in - in.ProviderConfig.DeepCopyInto(&out.ProviderConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthIdentityProvider. -func (in *OAuthIdentityProvider) DeepCopy() *OAuthIdentityProvider { - if in == nil { - return nil - } - out := new(OAuthIdentityProvider) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OAuthList) DeepCopyInto(out *OAuthList) { *out = *in @@ -1910,7 +1975,7 @@ func (in *OAuthSpec) DeepCopyInto(out *OAuthSpec) { *out = *in if in.IdentityProviders != nil { in, out := &in.IdentityProviders, &out.IdentityProviders - *out = make([]OAuthIdentityProvider, len(*in)) + *out = make([]IdentityProvider, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -1965,6 +2030,22 @@ func (in *OAuthTemplates) DeepCopy() *OAuthTemplates { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ObjectReference) DeepCopyInto(out *ObjectReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference. +func (in *ObjectReference) DeepCopy() *ObjectReference { + if in == nil { + return nil + } + out := new(ObjectReference) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenIDClaims) DeepCopyInto(out *OpenIDClaims) { *out = *in @@ -1999,8 +2080,8 @@ func (in *OpenIDClaims) DeepCopy() *OpenIDClaims { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenIDIdentityProvider) DeepCopyInto(out *OpenIDIdentityProvider) { *out = *in - out.CA = in.CA out.ClientSecret = in.ClientSecret + out.CA = in.CA if in.ExtraScopes != nil { in, out := &in.ExtraScopes, &out.ExtraScopes *out = make([]string, len(*in)) @@ -2044,6 +2125,22 @@ func (in *OpenIDURLs) DeepCopy() *OpenIDURLs { 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 + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperandVersion. +func (in *OperandVersion) DeepCopy() *OperandVersion { + if in == nil { + return nil + } + out := new(OperandVersion) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Project) DeepCopyInto(out *Project) { *out = *in @@ -2108,6 +2205,7 @@ func (in *ProjectList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ProjectSpec) DeepCopyInto(out *ProjectSpec) { *out = *in + out.ProjectRequestTemplate = in.ProjectRequestTemplate return } @@ -2138,17 +2236,121 @@ func (in *ProjectStatus) DeepCopy() *ProjectStatus { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyConfig) DeepCopyInto(out *ProxyConfig) { +func (in *Proxy) DeepCopyInto(out *Proxy) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Proxy. +func (in *Proxy) DeepCopy() *Proxy { + if in == nil { + return nil + } + out := new(Proxy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Proxy) 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 *ProxyList) DeepCopyInto(out *ProxyList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Proxy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyList. +func (in *ProxyList) DeepCopy() *ProxyList { + if in == nil { + return nil + } + out := new(ProxyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProxyList) 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 *ProxySpec) DeepCopyInto(out *ProxySpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxySpec. +func (in *ProxySpec) DeepCopy() *ProxySpec { + if in == nil { + return nil + } + out := new(ProxySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RegistriesConfig) DeepCopyInto(out *RegistriesConfig) { *out = *in + if in.SearchRegistries != nil { + in, out := &in.SearchRegistries, &out.SearchRegistries + if *in == nil { + *out = nil + } else { + *out = new([]string) + if **in != nil { + in, out := *in, *out + *out = make([]string, len(*in)) + copy(*out, *in) + } + } + } + if in.InsecureRegistries != nil { + in, out := &in.InsecureRegistries, &out.InsecureRegistries + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.BlockedRegistries != nil { + in, out := &in.BlockedRegistries, &out.BlockedRegistries + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AllowedRegistries != nil { + in, out := &in.AllowedRegistries, &out.AllowedRegistries + *out = make([]string, len(*in)) + copy(*out, *in) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyConfig. -func (in *ProxyConfig) DeepCopy() *ProxyConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistriesConfig. +func (in *RegistriesConfig) DeepCopy() *RegistriesConfig { if in == nil { return nil } - out := new(ProxyConfig) + out := new(RegistriesConfig) in.DeepCopyInto(out) return out } @@ -2292,6 +2494,7 @@ func (in *SchedulingList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SchedulingSpec) DeepCopyInto(out *SchedulingSpec) { *out = *in + out.Policy = in.Policy return } @@ -2321,6 +2524,22 @@ func (in *SchedulingStatus) DeepCopy() *SchedulingStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecretNameReference) DeepCopyInto(out *SecretNameReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretNameReference. +func (in *SecretNameReference) DeepCopy() *SecretNameReference { + if in == nil { + return nil + } + out := new(SecretNameReference) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServingInfo) DeepCopyInto(out *ServingInfo) { *out = *in @@ -2383,6 +2602,22 @@ func (in *StringSourceSpec) DeepCopy() *StringSourceSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TemplateReference) DeepCopyInto(out *TemplateReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateReference. +func (in *TemplateReference) DeepCopy() *TemplateReference { + if in == nil { + return nil + } + out := new(TemplateReference) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TokenConfig) DeepCopyInto(out *TokenConfig) { *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 new file mode 100644 index 00000000000..c28aaccbe7c --- /dev/null +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go @@ -0,0 +1,1065 @@ +package v1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_AdmissionPluginConfig = map[string]string{ + "": "AdmissionPluginConfig holds the necessary configuration options for admission plugins", + "location": "Location is the path to a configuration file that contains the plugin's configuration", + "configuration": "Configuration is an embedded configuration object to be used as the plugin's configuration. If present, it will be used instead of the path to the configuration file.", +} + +func (AdmissionPluginConfig) SwaggerDoc() map[string]string { + return map_AdmissionPluginConfig +} + +var map_AuditConfig = map[string]string{ + "": "AuditConfig holds configuration for the audit capabilities", + "enabled": "If this flag is set, audit log will be printed in the logs. The logs contains, method, user and a requested URL.", + "auditFilePath": "All requests coming to the apiserver will be logged to this file.", + "maximumFileRetentionDays": "Maximum number of days to retain old log files based on the timestamp encoded in their filename.", + "maximumRetainedFiles": "Maximum number of old log files to retain.", + "maximumFileSizeMegabytes": "Maximum size in megabytes of the log file before it gets rotated. Defaults to 100MB.", + "policyFile": "PolicyFile is a path to the file that defines the audit policy configuration.", + "policyConfiguration": "PolicyConfiguration is an embedded policy configuration object to be used as the audit policy configuration. If present, it will be used instead of the path to the policy file.", + "logFormat": "Format of saved audits (legacy or json).", + "webHookKubeConfig": "Path to a .kubeconfig formatted file that defines the audit webhook configuration.", + "webHookMode": "Strategy for sending audit events (block or batch).", +} + +func (AuditConfig) SwaggerDoc() map[string]string { + return map_AuditConfig +} + +var map_CertInfo = map[string]string{ + "": "CertInfo relates a certificate with a private key", + "certFile": "CertFile is a file containing a PEM-encoded certificate", + "keyFile": "KeyFile is a file containing a PEM-encoded private key for the certificate specified by CertFile", +} + +func (CertInfo) SwaggerDoc() map[string]string { + return map_CertInfo +} + +var map_ClientConnectionOverrides = map[string]string{ + "acceptContentTypes": "acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the default value of 'application/json'. This field will control all connections to the server used by a particular client.", + "contentType": "contentType is the content type used when sending data to the server from this client.", + "qps": "qps controls the number of queries per second allowed for this connection.", + "burst": "burst allows extra queries to accumulate when a client is exceeding its rate.", +} + +func (ClientConnectionOverrides) SwaggerDoc() map[string]string { + return map_ClientConnectionOverrides +} + +var map_ConfigMapFileReference = map[string]string{ + "": "ConfigMapFileReference references a config map in a specific namespace. The namespace must be specified at the point of use.", + "key": "Key allows pointing to a specific key/value inside of the configmap. This is useful for logical file references.", +} + +func (ConfigMapFileReference) SwaggerDoc() map[string]string { + return map_ConfigMapFileReference +} + +var map_ConfigMapNameReference = map[string]string{ + "": "ConfigMapNameReference references a config map in a specific namespace. The namespace must be specified at the point of use.", + "name": "name is the metadata.name of the referenced config map", +} + +func (ConfigMapNameReference) SwaggerDoc() map[string]string { + return map_ConfigMapNameReference +} + +var map_DelegatedAuthentication = map[string]string{ + "": "DelegatedAuthentication allows authentication to be disabled.", + "disabled": "disabled indicates that authentication should be disabled. By default it will use delegated authentication.", +} + +func (DelegatedAuthentication) SwaggerDoc() map[string]string { + return map_DelegatedAuthentication +} + +var map_DelegatedAuthorization = map[string]string{ + "": "DelegatedAuthorization allows authorization to be disabled.", + "disabled": "disabled indicates that authorization should be disabled. By default it will use delegated authorization.", +} + +func (DelegatedAuthorization) SwaggerDoc() map[string]string { + return map_DelegatedAuthorization +} + +var map_EtcdConnectionInfo = map[string]string{ + "": "EtcdConnectionInfo holds information necessary for connecting to an etcd server", + "urls": "URLs are the URLs for etcd", + "ca": "CA is a file containing trusted roots for the etcd server certificates", +} + +func (EtcdConnectionInfo) SwaggerDoc() map[string]string { + return map_EtcdConnectionInfo +} + +var map_EtcdStorageConfig = map[string]string{ + "storagePrefix": "StoragePrefix is the path within etcd that the OpenShift resources will be rooted under. This value, if changed, will mean existing objects in etcd will no longer be located.", +} + +func (EtcdStorageConfig) SwaggerDoc() map[string]string { + return map_EtcdStorageConfig +} + +var map_GenericAPIServerConfig = map[string]string{ + "": "GenericAPIServerConfig is an inline-able struct for aggregated apiservers that need to store data in etcd", + "servingInfo": "ServingInfo describes how to start serving", + "corsAllowedOrigins": "CORSAllowedOrigins", + "auditConfig": "AuditConfig describes how to configure audit information", + "storageConfig": "StorageConfig contains information about how to use", +} + +func (GenericAPIServerConfig) SwaggerDoc() map[string]string { + return map_GenericAPIServerConfig +} + +var map_GenericControllerConfig = map[string]string{ + "": "GenericControllerConfig provides information to configure a controller", + "servingInfo": "ServingInfo is the HTTP serving information for the controller's endpoints", + "leaderElection": "leaderElection provides information to elect a leader. Only override this if you have a specific need", + "authentication": "authentication allows configuration of authentication for the endpoints", + "authorization": "authorization allows configuration of authentication for the endpoints", +} + +func (GenericControllerConfig) SwaggerDoc() map[string]string { + return map_GenericControllerConfig +} + +var map_HTTPServingInfo = map[string]string{ + "": "HTTPServingInfo holds configuration for serving HTTP", + "maxRequestsInFlight": "MaxRequestsInFlight is the number of concurrent requests allowed to the server. If zero, no limit.", + "requestTimeoutSeconds": "RequestTimeoutSeconds is the number of seconds before requests are timed out. The default is 60 minutes, if -1 there is no limit on requests.", +} + +func (HTTPServingInfo) SwaggerDoc() map[string]string { + return map_HTTPServingInfo +} + +var map_KubeClientConfig = map[string]string{ + "kubeConfig": "kubeConfig is a .kubeconfig filename for going to the owning kube-apiserver. Empty uses an in-cluster-config", + "connectionOverrides": "connectionOverrides specifies client overrides for system components to loop back to this master.", +} + +func (KubeClientConfig) SwaggerDoc() map[string]string { + return map_KubeClientConfig +} + +var map_LeaderElection = map[string]string{ + "": "LeaderElection provides information to elect a leader", + "disable": "disable allows leader election to be suspended while allowing a fully defaulted \"normal\" startup case.", + "namespace": "namespace indicates which namespace the resource is in", + "name": "name indicates what name to use for the resource", + "leaseDuration": "leaseDuration is the duration that non-leader candidates will wait after observing a leadership renewal until attempting to acquire leadership of a led but unrenewed leader slot. This is effectively the maximum duration that a leader can be stopped before it is replaced by another candidate. This is only applicable if leader election is enabled.", + "renewDeadline": "renewDeadline is the interval between attempts by the acting master to renew a leadership slot before it stops leading. This must be less than or equal to the lease duration. This is only applicable if leader election is enabled.", + "retryPeriod": "retryPeriod is the duration the clients should wait between attempting acquisition and renewal of a leadership. This is only applicable if leader election is enabled.", +} + +func (LeaderElection) SwaggerDoc() map[string]string { + return map_LeaderElection +} + +var map_NamedCertificate = map[string]string{ + "": "NamedCertificate specifies a certificate/key, and the names it should be served for", + "names": "Names is a list of DNS names this certificate should be used to secure A name can be a normal DNS name, or can contain leading wildcard segments.", +} + +func (NamedCertificate) SwaggerDoc() map[string]string { + return map_NamedCertificate +} + +var map_RemoteConnectionInfo = map[string]string{ + "": "RemoteConnectionInfo holds information necessary for establishing a remote connection", + "url": "URL is the remote URL to connect to", + "ca": "CA is the CA for verifying TLS connections", +} + +func (RemoteConnectionInfo) SwaggerDoc() map[string]string { + return map_RemoteConnectionInfo +} + +var map_SecretNameReference = map[string]string{ + "": "SecretNameReference references a secret in a specific namespace. The namespace must be specified at the point of use.", + "name": "name is the metadata.name of the referenced secret", +} + +func (SecretNameReference) SwaggerDoc() map[string]string { + return map_SecretNameReference +} + +var map_ServingInfo = map[string]string{ + "": "ServingInfo holds information about serving web pages", + "bindAddress": "BindAddress is the ip:port to serve on", + "bindNetwork": "BindNetwork is the type of network to bind to - defaults to \"tcp4\", accepts \"tcp\", \"tcp4\", and \"tcp6\"", + "clientCA": "ClientCA is the certificate bundle for all the signers that you'll recognize for incoming client certificates", + "namedCertificates": "NamedCertificates is a list of certificates to use to secure requests to specific hostnames", + "minTLSVersion": "MinTLSVersion is the minimum TLS version supported. Values must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants", + "cipherSuites": "CipherSuites contains an overridden list of ciphers for the server to support. Values must match cipher suite IDs from https://golang.org/pkg/crypto/tls/#pkg-constants", +} + +func (ServingInfo) SwaggerDoc() map[string]string { + return map_ServingInfo +} + +var map_StringSource = map[string]string{ + "": "StringSource allows specifying a string inline, or externally via env var or file. When it contains only a string value, it marshals to a simple JSON string.", +} + +func (StringSource) SwaggerDoc() map[string]string { + return map_StringSource +} + +var map_StringSourceSpec = map[string]string{ + "": "StringSourceSpec specifies a string value, or external location", + "value": "Value specifies the cleartext value, or an encrypted value if keyFile is specified.", + "env": "Env specifies an envvar containing the cleartext value, or an encrypted value if the keyFile is specified.", + "file": "File references a file containing the cleartext value, or an encrypted value if a keyFile is specified.", + "keyFile": "KeyFile references a file containing the key to use to decrypt the value.", +} + +func (StringSourceSpec) SwaggerDoc() map[string]string { + return map_StringSourceSpec +} + +var map_APIServer = map[string]string{ + "": "APIServer holds cluster-wide information about api-servers. The canonical name is `cluster`", +} + +func (APIServer) SwaggerDoc() map[string]string { + return map_APIServer +} + +var map_APIServerNamedServingCert = map[string]string{ + "": "APIServerNamedServingCert maps a server DNS name, as understood by a client, to a certificate.", + "names": "names is a optional list of explicit DNS names (leading wildcards allowed) that should use this certificate to serve secure traffic. If no names are provided, the implicit names will be extracted from the certificates. Exact names trump over wildcard names. Explicit names defined here trump over extracted implicit names.", + "servingCertificate": "servingCertificate references a kubernetes.io/tls type secret containing the TLS cert info for serving secure traffic. The secret must exist in the openshift-config namespace and contain the following required fields: - Secret.Data[\"tls.key\"] - TLS private key. - Secret.Data[\"tls.crt\"] - TLS certificate.", +} + +func (APIServerNamedServingCert) SwaggerDoc() map[string]string { + return map_APIServerNamedServingCert +} + +var map_APIServerServingCerts = map[string]string{ + "defaultServingCertificate": "defaultServingCertificate references a kubernetes.io/tls type secret containing the default TLS cert info for serving secure traffic. If no named certificates match the server name as understood by a client, this default certificate will be used. If defaultServingCertificate is not specified, then a operator managed certificate will be used. The secret must exist in the openshift-config namespace and contain the following required fields: - Secret.Data[\"tls.key\"] - TLS private key. - Secret.Data[\"tls.crt\"] - TLS certificate.", + "namedCertificates": "namedCertificates references secrets containing the TLS cert info for serving secure traffic to specific hostnames. If no named certificates are provided, or no named certificates match the server name as understood by a client, the defaultServingCertificate will be used.", +} + +func (APIServerServingCerts) SwaggerDoc() map[string]string { + return map_APIServerServingCerts +} + +var map_APIServerSpec = map[string]string{ + "servingCerts": "servingCert is the TLS cert info for serving secure traffic. If not specified, operator managed certificates will be used for serving secure traffic.", + "clientCA": "clientCA references a ConfigMap containing a certificate bundle for the signers that will be recognized for incoming client certificates in addition to the operator managed signers. If this is empty, then only operator managed signers are valid. You usually only have to set this if you have your own PKI you wish to honor client certificates from. The ConfigMap must exist in the openshift-config namespace and contain the following required fields: - ConfigMap.Data[\"ca-bundle.crt\"] - CA bundle.", +} + +func (APIServerSpec) SwaggerDoc() map[string]string { + return map_APIServerSpec +} + +var map_Authentication = map[string]string{ + "": "Authentication holds cluster-wide information about Authentication. 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 (Authentication) SwaggerDoc() map[string]string { + return map_Authentication +} + +var map_AuthenticationList = map[string]string{ + "metadata": "Standard object's metadata.", +} + +func (AuthenticationList) SwaggerDoc() map[string]string { + return map_AuthenticationList +} + +var map_AuthenticationSpec = map[string]string{ + "type": "type identifies the cluster managed, user facing authentication mode in use. Specifically, it manages the component that responds to login attempts. The default is IntegratedOAuth.", + "oauthMetadata": "oauthMetadata contains the discovery endpoint data for OAuth 2.0 Authorization Server Metadata for an external OAuth server. This discovery document can be viewed from its served location: oc get --raw '/.well-known/oauth-authorization-server' For further details, see the IETF Draft: https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2 If oauthMetadata.name is non-empty, this value has precedence over any metadata reference stored in status. The key \"oauthMetadata\" is used to locate the data. If specified and the config map or expected key is not found, no metadata is served. If the specified metadata is not valid, no metadata is served. The namespace for this config map is openshift-config.", + "webhookTokenAuthenticators": "webhookTokenAuthenticators configures remote token reviewers. These remote authentication webhooks can be used to verify bearer tokens via the tokenreviews.authentication.k8s.io REST API. This is required to honor bearer tokens that are provisioned by an external authentication service. The namespace for these secrets is openshift-config.", +} + +func (AuthenticationSpec) SwaggerDoc() map[string]string { + return map_AuthenticationSpec +} + +var map_AuthenticationStatus = map[string]string{ + "integratedOAuthMetadata": "integratedOAuthMetadata contains the discovery endpoint data for OAuth 2.0 Authorization Server Metadata for the in-cluster integrated OAuth server. This discovery document can be viewed from its served location: oc get --raw '/.well-known/oauth-authorization-server' For further details, see the IETF Draft: https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2 This contains the observed value based on cluster state. An explicitly set value in spec.oauthMetadata has precedence over this field. This field has no meaning if authentication spec.type is not set to IntegratedOAuth. The key \"oauthMetadata\" is used to locate the data. If the config map or expected key is not found, no metadata is served. If the specified metadata is not valid, no metadata is served. The namespace for this config map is openshift-config-managed.", +} + +func (AuthenticationStatus) SwaggerDoc() map[string]string { + return map_AuthenticationStatus +} + +var map_WebhookTokenAuthenticator = map[string]string{ + "": "webhookTokenAuthenticator holds the necessary configuration options for a remote token authenticator", + "kubeConfig": "kubeConfig contains kube config file data which describes how to access the remote webhook service. For further details, see: https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication The key \"kubeConfig\" is used to locate the data. If the secret or expected key is not found, the webhook is not honored. If the specified kube config data is not valid, the webhook is not honored. The namespace for this secret is determined by the point of use.", +} + +func (WebhookTokenAuthenticator) SwaggerDoc() map[string]string { + return map_WebhookTokenAuthenticator +} + +var map_Build = map[string]string{ + "": "Build holds cluster-wide information on how to handle builds. The canonical name is `cluster`", + "spec": "Spec holds user-settable values for the build controller configuration", +} + +func (Build) SwaggerDoc() map[string]string { + return map_Build +} + +var map_BuildDefaults = map[string]string{ + "defaultProxy": "DefaultProxy contains the default proxy settings for all build operations, including image pull/push and source download.\n\nValues can be overrode by setting the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` environment variables in the build config's strategy.", + "gitProxy": "GitProxy contains the proxy settings for git operations only. If set, this will override any Proxy settings for all git commands, such as git clone.\n\nValues that are not set here will be inherited from DefaultProxy.", + "env": "Env is a set of default environment variables that will be applied to the build if the specified variables do not exist on the build", + "imageLabels": "ImageLabels is a list of docker labels that are applied to the resulting image. User can override a default label by providing a label with the same name in their Build/BuildConfig.", + "resources": "Resources defines resource requirements to execute the build.", + "registriesConfig": "RegistriesConfig controls the registries allowed for image pull and push.", +} + +func (BuildDefaults) SwaggerDoc() map[string]string { + return map_BuildDefaults +} + +var map_BuildList = map[string]string{ + "metadata": "Standard object's metadata.", +} + +func (BuildList) SwaggerDoc() map[string]string { + return map_BuildList +} + +var map_BuildOverrides = map[string]string{ + "imageLabels": "ImageLabels is a list of docker labels that are applied to the resulting image. If user provided a label in their Build/BuildConfig with the same name as one in this list, the user's label will be overwritten.", + "nodeSelector": "NodeSelector is a selector which must be true for the build pod to fit on a node", + "tolerations": "Tolerations is a list of Tolerations that will override any existing tolerations set on a build pod.", +} + +func (BuildOverrides) SwaggerDoc() map[string]string { + return map_BuildOverrides +} + +var map_BuildSpec = map[string]string{ + "additionalTrustedCA": "AdditionalTrustedCA is a reference to a ConfigMap containing additional CAs that should be trusted for image pushes and pulls during builds. The namespace for this config map is openshift-config.", + "buildDefaults": "BuildDefaults controls the default information for Builds", + "buildOverrides": "BuildOverrides controls override settings for builds", +} + +func (BuildSpec) SwaggerDoc() map[string]string { + return map_BuildSpec +} + +var map_ImageLabel = map[string]string{ + "name": "Name defines the name of the label. It must have non-zero length.", + "value": "Value defines the literal value of the label.", +} + +func (ImageLabel) SwaggerDoc() map[string]string { + return map_ImageLabel +} + +var map_RegistriesConfig = map[string]string{ + "searchRegistries": "SearchRegistries lists the registries to search for images if an image repository is not specified in an image pull spec.\n\nIf this is not set, builds will search Docker Hub (docker.io) when a repository is not specified. Setting this to an empty list will require all builds to fully qualify their image pull specs.", + "insecureRegistries": "InsecureRegistries are registries which do not have a valid SSL certificate or only support HTTP connections.", + "blockedRegistries": "BlockedRegistries are blacklisted from image pull/push. All other registries are allowed.\n\nOnly one of BlockedRegistries or AllowedRegistries may be set.", + "allowedRegistries": "AllowedRegistries are whitelisted for image pull/push. All other registries are blocked.\n\nOnly one of BlockedRegistries or AllowedRegistries may be set.", +} + +func (RegistriesConfig) SwaggerDoc() map[string]string { + return map_RegistriesConfig +} + +var map_ClusterOperator = map[string]string{ + "": "ClusterOperator is the Custom Resource object which holds the current state of an operator. This object is used by operators to convey their state to the rest of the cluster.", + "spec": "spec hold the intent of how this operator should behave.", + "status": "status holds the information about the state of an operator. It is consistent with status information across the kube ecosystem.", +} + +func (ClusterOperator) SwaggerDoc() map[string]string { + return map_ClusterOperator +} + +var map_ClusterOperatorList = map[string]string{ + "": "ClusterOperatorList is a list of OperatorStatus resources.", +} + +func (ClusterOperatorList) SwaggerDoc() map[string]string { + return map_ClusterOperatorList +} + +var map_ClusterOperatorSpec = map[string]string{ + "": "ClusterOperatorSpec is empty for now, but you could imagine holding information like \"pause\".", +} + +func (ClusterOperatorSpec) SwaggerDoc() map[string]string { + return map_ClusterOperatorSpec +} + +var map_ClusterOperatorStatus = map[string]string{ + "": "ClusterOperatorStatus provides information about the status of the operator.", + "conditions": "conditions describes the state of the operator's reconciliation functionality.", + "versions": "versions is a slice of operand version tuples. Operators which manage multiple operands will have multiple entries in the array. If an operator is Available, it must have at least one entry. You must report the version of the operator itself with the name \"operator\".", + "relatedObjects": "relatedObjects is a list of objects that are \"interesting\" or related to this operator. Common uses are: 1. the detailed resource driving the operator 2. operator namespaces 3. operand namespaces", + "extension": "extension contains any additional status information specific to the operator which owns this status object.", +} + +func (ClusterOperatorStatus) SwaggerDoc() map[string]string { + return map_ClusterOperatorStatus +} + +var map_ClusterOperatorStatusCondition = map[string]string{ + "": "ClusterOperatorStatusCondition represents the state of the operator's reconciliation functionality.", + "type": "type specifies the state of the operator's reconciliation functionality.", + "status": "status of the condition, one of True, False, Unknown.", + "lastTransitionTime": "lastTransitionTime is the time of the last update to the current status object.", + "reason": "reason is the reason for the condition's last transition. Reasons are CamelCase", + "message": "message provides additional information about the current condition. This is only to be consumed by humans.", +} + +func (ClusterOperatorStatusCondition) SwaggerDoc() map[string]string { + return map_ClusterOperatorStatusCondition +} + +var map_ObjectReference = map[string]string{ + "": "ObjectReference contains enough information to let you inspect or modify the referred object.", + "group": "group of the referent.", + "resource": "resource of the referent.", + "namespace": "namespace of the referent.", + "name": "name of the referent.", +} + +func (ObjectReference) SwaggerDoc() map[string]string { + return map_ObjectReference +} + +var map_OperandVersion = map[string]string{ + "name": "name is the name of the particular operand this version is for. It usually matches container images, not operators.", + "version": "version indicates which version of a particular operand is currently being manage. It must always match the Available condition. If 1.0.0 is Available, then this must indicate 1.0.0 even if the operator is trying to rollout 1.1.0", +} + +func (OperandVersion) SwaggerDoc() map[string]string { + return map_OperandVersion +} + +var map_ClusterVersion = map[string]string{ + "": "ClusterVersion is the configuration for the ClusterVersionOperator. This is where parameters related to automatic updates can be set.", + "spec": "spec is the desired state of the cluster version - the operator will work to ensure that the desired version is applied to the cluster.", + "status": "status contains information about the available updates and any in-progress updates.", +} + +func (ClusterVersion) SwaggerDoc() map[string]string { + return map_ClusterVersion +} + +var map_ClusterVersionList = map[string]string{ + "": "ClusterVersionList is a list of ClusterVersion resources.", +} + +func (ClusterVersionList) SwaggerDoc() map[string]string { + return map_ClusterVersionList +} + +var map_ClusterVersionSpec = map[string]string{ + "": "ClusterVersionSpec is the desired version state of the cluster. It includes the version the cluster should be at, how the cluster is identified, and where the cluster should look for version updates.", + "clusterID": "clusterID uniquely identifies this cluster. This is expected to be an RFC4122 UUID value (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx in hexadecimal values). This is a required field.", + "desiredUpdate": "desiredUpdate is an optional field that indicates the desired value of the cluster version. Setting this value will trigger an upgrade (if the current version does not match the desired version). The set of recommended update values is listed as part of available updates in status, and setting values outside that range may cause the upgrade to fail. You may specify the version field without setting image if an update exists with that version in the availableUpdates or history.\n\nIf an upgrade fails the operator will halt and report status about the failing component. Setting the desired update value back to the previous version will cause a rollback to be attempted. Not all rollbacks will succeed.", + "upstream": "upstream may be used to specify the preferred update server. By default it will use the appropriate update server for the cluster and region.", + "channel": "channel is an identifier for explicitly requesting that a non-default set of updates be applied to this cluster. The default channel will be contain stable updates that are appropriate for production clusters.", + "overrides": "overrides is list of overides for components that are managed by cluster version operator. Marking a component unmanaged will prevent the operator from creating or updating the object.", +} + +func (ClusterVersionSpec) SwaggerDoc() map[string]string { + return map_ClusterVersionSpec +} + +var map_ClusterVersionStatus = map[string]string{ + "": "ClusterVersionStatus reports the status of the cluster versioning, including any upgrades that are in progress. The current field will be set to whichever version the cluster is reconciling to, and the conditions array will report whether the update succeeded, is in progress, or is failing.", + "desired": "desired is the version that the cluster is reconciling towards. If the cluster is not yet fully initialized desired will be set with the information available, which may be an image or a tag.", + "history": "history contains a list of the most recent versions applied to the cluster. This value may be empty during cluster startup, and then will be updated when a new update is being applied. The newest update is first in the list and it is ordered by recency. Updates in the history have state Completed if the rollout completed - if an update was failing or halfway applied the state will be Partial. Only a limited amount of update history is preserved.", + "observedGeneration": "observedGeneration reports which version of the spec is being synced. If this value is not equal to metadata.generation, then the desired and conditions fields may represent from a previous version.", + "versionHash": "versionHash is a fingerprint of the content that the cluster will be updated with. It is used by the operator to avoid unnecessary work and is for internal use only.", + "conditions": "conditions provides information about the cluster version. The condition \"Available\" is set to true if the desiredUpdate has been reached. The condition \"Progressing\" is set to true if an update is being applied. The condition \"Failing\" is set to true if an update is currently blocked by a temporary or permanent error. Conditions are only valid for the current desiredUpdate when metadata.generation is equal to status.generation.", + "availableUpdates": "availableUpdates contains the list of updates that are appropriate for this cluster. This list may be empty if no updates are recommended, if the update service is unavailable, or if an invalid channel has been specified.", +} + +func (ClusterVersionStatus) SwaggerDoc() map[string]string { + return map_ClusterVersionStatus +} + +var map_ComponentOverride = map[string]string{ + "": "ComponentOverride allows overriding cluster version operator's behavior for a component.", + "kind": "kind indentifies which object to override.", + "group": "group identifies the API group that the kind is in.", + "namespace": "namespace is the component's namespace. If the resource is cluster scoped, the namespace should be empty.", + "name": "name is the component's name.", + "unmanaged": "unmanaged controls if cluster version operator should stop managing the resources in this cluster. Default: false", +} + +func (ComponentOverride) SwaggerDoc() map[string]string { + return map_ComponentOverride +} + +var map_Update = map[string]string{ + "": "Update represents a release of the ClusterVersionOperator, referenced by the Image member.", + "version": "version is a semantic versioning identifying the update version. When this field is part of spec, version is optional if image is specified.", + "image": "image is a container image location that contains the update. When this field is part of spec, image is optional if version is specified and the availableUpdates field contains a matching version.", +} + +func (Update) SwaggerDoc() map[string]string { + return map_Update +} + +var map_UpdateHistory = map[string]string{ + "": "UpdateHistory is a single attempted update to the cluster.", + "state": "state reflects whether the update was fully applied. The Partial state indicates the update is not fully applied, while the Completed state indicates the update was successfully rolled out at least once (all parts of the update successfully applied).", + "startedTime": "startedTime is the time at which the update was started.", + "completionTime": "completionTime, if set, is when the update was fully applied. The update that is currently being applied will have a null completion time. Completion time will always be set for entries that are not the current update (usually to the started time of the next update).", + "version": "version is a semantic versioning identifying the update version. If the requested image does not define a version, or if a failure occurs retrieving the image, this value may be empty.", + "image": "image is a container image location that contains the update. This value is always populated.", +} + +func (UpdateHistory) SwaggerDoc() map[string]string { + return map_UpdateHistory +} + +var map_Console = map[string]string{ + "": "Console holds cluster-wide information about Console. 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 (Console) SwaggerDoc() map[string]string { + return map_Console +} + +var map_ConsoleList = map[string]string{ + "metadata": "Standard object's metadata.", +} + +func (ConsoleList) SwaggerDoc() map[string]string { + return map_ConsoleList +} + +var map_DNS = map[string]string{ + "": "DNS holds cluster-wide information about DNS. 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 (DNS) SwaggerDoc() map[string]string { + return map_DNS +} + +var map_DNSList = map[string]string{ + "metadata": "Standard object's metadata.", +} + +func (DNSList) SwaggerDoc() map[string]string { + return map_DNSList +} + +var map_DNSSpec = map[string]string{ + "baseDomain": "baseDomain is the base domain of the cluster. All managed DNS records will be sub-domains of this base.\n\nFor example, given the base domain `openshift.example.com`, an API server DNS record may be created for `cluster-api.openshift.example.com`.", +} + +func (DNSSpec) SwaggerDoc() map[string]string { + return map_DNSSpec +} + +var map_Image = map[string]string{ + "": "Image holds cluster-wide information about how to handle images. 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 (Image) SwaggerDoc() map[string]string { + return map_Image +} + +var map_ImageList = map[string]string{ + "metadata": "Standard object's metadata.", +} + +func (ImageList) SwaggerDoc() map[string]string { + return map_ImageList +} + +var map_ImageSpec = map[string]string{ + "allowedRegistriesForImport": "AllowedRegistriesForImport limits the container image registries that normal users may import images from. Set this list to the registries that you trust to contain valid Docker images and that you want applications to be able to import from. Users with permission to create Images or ImageStreamMappings via the API are not affected by this policy - typically only administrators or system integrations will have those permissions.", + "externalRegistryHostnames": "externalRegistryHostnames provides the hostnames for the default external image registry. The external hostname should be set only when the image registry is exposed externally. The first value is used in 'publicDockerImageRepository' field in ImageStreams. The value must be in \"hostname[:port]\" format.", + "additionalTrustedCA": "AdditionalTrustedCA is a reference to a ConfigMap containing additional CAs that should be trusted during imagestream import. The namespace for this config map is openshift-config.", +} + +func (ImageSpec) SwaggerDoc() map[string]string { + return map_ImageSpec +} + +var map_ImageStatus = map[string]string{ + "internalRegistryHostname": "this value is set by the image registry operator which controls the internal registry hostname InternalRegistryHostname sets the hostname for the default internal image registry. The value must be in \"hostname[:port]\" format. For backward compatibility, users can still use OPENSHIFT_DEFAULT_REGISTRY environment variable but this setting overrides the environment variable.", + "externalRegistryHostnames": "externalRegistryHostnames provides the hostnames for the default external image registry. The external hostname should be set only when the image registry is exposed externally. The first value is used in 'publicDockerImageRepository' field in ImageStreams. The value must be in \"hostname[:port]\" format.", +} + +func (ImageStatus) SwaggerDoc() map[string]string { + return map_ImageStatus +} + +var map_RegistryLocation = map[string]string{ + "": "RegistryLocation contains a location of the registry specified by the registry domain name. The domain name might include wildcards, like '*' or '??'.", + "domainName": "DomainName specifies a domain name for the registry In case the registry use non-standard (80 or 443) port, the port should be included in the domain name as well.", + "insecure": "Insecure indicates whether the registry is secure (https) or insecure (http) By default (if not specified) the registry is assumed as secure.", +} + +func (RegistryLocation) SwaggerDoc() map[string]string { + return map_RegistryLocation +} + +var map_Infrastructure = map[string]string{ + "": "Infrastructure holds cluster-wide information about Infrastructure. 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 (Infrastructure) SwaggerDoc() map[string]string { + return map_Infrastructure +} + +var map_InfrastructureList = map[string]string{ + "metadata": "Standard object's metadata.", +} + +func (InfrastructureList) SwaggerDoc() map[string]string { + return map_InfrastructureList +} + +var map_InfrastructureStatus = map[string]string{ + "platform": "platform is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled.", +} + +func (InfrastructureStatus) SwaggerDoc() map[string]string { + return map_InfrastructureStatus +} + +var map_Ingress = map[string]string{ + "": "Ingress holds cluster-wide information about Ingress. 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 (Ingress) SwaggerDoc() map[string]string { + return map_Ingress +} + +var map_IngressList = map[string]string{ + "metadata": "Standard object's metadata.", +} + +func (IngressList) SwaggerDoc() map[string]string { + return map_IngressList +} + +var map_IngressSpec = map[string]string{ + "domain": "domain is used to generate a default host name for a route when the route's host name is empty. The generated host name will follow this pattern: \"..\".", +} + +func (IngressSpec) SwaggerDoc() map[string]string { + return map_IngressSpec +} + +var map_ClusterNetworkEntry = map[string]string{ + "": "ClusterNetworkEntry is a contiguous block of IP addresses from which pod IPs are allocated.", + "cidr": "The complete block for pod IPs.", + "hostPrefix": "The size (prefix) of block to allocate to each node.", +} + +func (ClusterNetworkEntry) SwaggerDoc() map[string]string { + return map_ClusterNetworkEntry +} + +var map_Network = map[string]string{ + "": "Network holds cluster-wide information about Network. 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 (Network) SwaggerDoc() map[string]string { + return map_Network +} + +var map_NetworkList = map[string]string{ + "metadata": "Standard object's metadata.", +} + +func (NetworkList) SwaggerDoc() map[string]string { + return map_NetworkList +} + +var map_NetworkSpec = map[string]string{ + "": "NetworkSpec is the desired network configuration. As a general rule, this SHOULD NOT be read directly. Instead, you should consume the NetworkStatus, as it indicates the currently deployed configuration. Currently, none of these fields may be changed after installation.", + "clusterNetwork": "IP address pool to use for pod IPs.", + "serviceNetwork": "IP address pool for services. Currently, we only support a single entry here.", + "networkType": "NetworkType is the plugin that is to be deployed (e.g. OpenShiftSDN). This should match a value that the cluster-network-operator understands, or else no networking will be installed. Currently supported values are: - OpenShiftSDN", +} + +func (NetworkSpec) SwaggerDoc() map[string]string { + return map_NetworkSpec +} + +var map_NetworkStatus = map[string]string{ + "": "NetworkStatus is the current network configuration.", + "clusterNetwork": "IP address pool to use for pod IPs.", + "serviceNetwork": "IP address pool for services. Currently, we only support a single entry here.", + "networkType": "NetworkType is the plugin that is deployed (e.g. OpenShiftSDN).", + "clusterNetworkMTU": "ClusterNetworkMTU is the MTU for inter-pod networking.", +} + +func (NetworkStatus) SwaggerDoc() map[string]string { + return map_NetworkStatus +} + +var map_BasicAuthIdentityProvider = map[string]string{ + "": "BasicAuthPasswordIdentityProvider provides identities for users authenticating using HTTP basic auth credentials", +} + +func (BasicAuthIdentityProvider) SwaggerDoc() map[string]string { + return map_BasicAuthIdentityProvider +} + +var map_GitHubIdentityProvider = map[string]string{ + "": "GitHubIdentityProvider provides identities for users authenticating using GitHub credentials", + "clientID": "clientID is the oauth client ID", + "clientSecret": "clientSecret is a required reference to the secret by name containing the oauth client secret. The key \"clientSecret\" is used to locate the data. If the secret or expected key is not found, the identity provider is not honored. The namespace for this secret is openshift-config.", + "organizations": "organizations optionally restricts which organizations are allowed to log in", + "teams": "teams optionally restricts which teams are allowed to log in. Format is /.", + "hostname": "hostname is the optional domain (e.g. \"mycompany.com\") for use with a hosted instance of GitHub Enterprise. It must match the GitHub Enterprise settings value configured at /setup/settings#hostname.", + "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. This can only be configured when hostname is set to a non-empty value. The namespace for this config map is openshift-config.", +} + +func (GitHubIdentityProvider) SwaggerDoc() map[string]string { + return map_GitHubIdentityProvider +} + +var map_GitLabIdentityProvider = map[string]string{ + "": "GitLabIdentityProvider provides identities for users authenticating using GitLab credentials", + "clientID": "clientID is the oauth client ID", + "clientSecret": "clientSecret is a required reference to the secret by name containing the oauth client secret. The key \"clientSecret\" is used to locate the data. If the secret or expected key is not found, the identity provider is not honored. The namespace for this secret is openshift-config.", + "url": "url is the oauth server base URL", + "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.", +} + +func (GitLabIdentityProvider) SwaggerDoc() map[string]string { + return map_GitLabIdentityProvider +} + +var map_GoogleIdentityProvider = map[string]string{ + "": "GoogleIdentityProvider provides identities for users authenticating using Google credentials", + "clientID": "clientID is the oauth client ID", + "clientSecret": "clientSecret is a required reference to the secret by name containing the oauth client secret. The key \"clientSecret\" is used to locate the data. If the secret or expected key is not found, the identity provider is not honored. The namespace for this secret is openshift-config.", + "hostedDomain": "hostedDomain is the optional Google App domain (e.g. \"mycompany.com\") to restrict logins to", +} + +func (GoogleIdentityProvider) SwaggerDoc() map[string]string { + return map_GoogleIdentityProvider +} + +var map_HTPasswdIdentityProvider = map[string]string{ + "": "HTPasswdPasswordIdentityProvider provides identities for users authenticating using htpasswd credentials", + "fileData": "fileData is a required reference to a secret by name containing the data to use as the htpasswd file. The key \"htpasswd\" is used to locate the data. If the secret or expected key is not found, the identity provider is not honored. If the specified htpasswd data is not valid, the identity provider is not honored. The namespace for this secret is openshift-config.", +} + +func (HTPasswdIdentityProvider) SwaggerDoc() map[string]string { + return map_HTPasswdIdentityProvider +} + +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\"", +} + +func (IdentityProvider) SwaggerDoc() map[string]string { + return map_IdentityProvider +} + +var map_IdentityProviderConfig = map[string]string{ + "": "IdentityProviderConfig contains configuration for using a specific identity provider", + "type": "type identifies the identity provider type for this entry.", + "basicAuth": "basicAuth contains configuration options for the BasicAuth IdP", + "github": "github enables user authentication using GitHub credentials", + "gitlab": "gitlab enables user authentication using GitLab credentials", + "google": "google enables user authentication using Google credentials", + "htpasswd": "htpasswd enables user authentication using an HTPasswd file to validate credentials", + "keystone": "keystone enables user authentication using keystone password credentials", + "ldap": "ldap enables user authentication using LDAP credentials", + "openID": "openID enables user authentication using OpenID credentials", + "requestHeader": "requestHeader enables user authentication using request header credentials", +} + +func (IdentityProviderConfig) SwaggerDoc() map[string]string { + return map_IdentityProviderConfig +} + +var map_KeystoneIdentityProvider = map[string]string{ + "": "KeystonePasswordIdentityProvider provides identities for users authenticating using keystone password credentials", + "domainName": "domainName is required for keystone v3", +} + +func (KeystoneIdentityProvider) SwaggerDoc() map[string]string { + return map_KeystoneIdentityProvider +} + +var map_LDAPAttributeMapping = map[string]string{ + "": "LDAPAttributeMapping maps LDAP attributes to OpenShift identity fields", + "id": "id is the list of attributes whose values should be used as the user ID. Required. First non-empty attribute is used. At least one attribute is required. If none of the listed attribute have a value, authentication fails. LDAP standard identity attribute is \"dn\"", + "preferredUsername": "preferredUsername is the list of attributes whose values should be used as the preferred username. LDAP standard login attribute is \"uid\"", + "name": "name is the list of attributes whose values should be used as the display name. Optional. If unspecified, no display name is set for the identity LDAP standard display name attribute is \"cn\"", + "email": "email is the list of attributes whose values should be used as the email address. Optional. If unspecified, no email is set for the identity", +} + +func (LDAPAttributeMapping) SwaggerDoc() map[string]string { + return map_LDAPAttributeMapping +} + +var map_LDAPIdentityProvider = map[string]string{ + "": "LDAPPasswordIdentityProvider provides identities for users authenticating using LDAP credentials", + "url": "url is an RFC 2255 URL which specifies the LDAP search parameters to use. The syntax of the URL is: ldap://host:port/basedn?attribute?scope?filter", + "bindDN": "bindDN is an optional DN to bind with during the search phase.", + "bindPassword": "bindPassword is an optional reference to a secret by name containing a password to bind with during the search phase. The key \"bindPassword\" is used to locate the data. If specified and the secret or expected key is not found, the identity provider is not honored. The namespace for this secret is openshift-config.", + "insecure": "insecure, if true, indicates the connection should not use TLS WARNING: Should not be set to `true` with the URL scheme \"ldaps://\" as \"ldaps://\" URLs always\n attempt to connect using TLS, even when `insecure` is set to `true`\nWhen `true`, \"ldap://\" URLS connect insecurely. When `false`, \"ldap://\" URLs are upgraded to a TLS connection using StartTLS as specified in https://tools.ietf.org/html/rfc2830.", + "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.", + "attributes": "attributes maps LDAP attributes to identities", +} + +func (LDAPIdentityProvider) SwaggerDoc() map[string]string { + return map_LDAPIdentityProvider +} + +var map_OAuth = map[string]string{ + "": "OAuth holds cluster-wide information about OAuth. The canonical name is `cluster`. It is used to configure the integrated OAuth server. This configuration is only honored when the top level Authentication config has type set to IntegratedOAuth.", +} + +func (OAuth) SwaggerDoc() map[string]string { + return map_OAuth +} + +var map_OAuthRemoteConnectionInfo = map[string]string{ + "": "OAuthRemoteConnectionInfo holds information necessary for establishing a remote connection", + "url": "url is the remote URL to connect to", + "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.", + "tlsClientCert": "tlsClientCert is an optional reference to a secret by name that contains the PEM-encoded TLS client certificate to present when connecting to the server. The key \"tls.crt\" is used to locate the data. If specified and the secret or expected key is not found, the identity provider is not honored. If the specified certificate data is not valid, the identity provider is not honored. The namespace for this secret is openshift-config.", + "tlsClientKey": "tlsClientKey is an optional reference to a secret by name that contains the PEM-encoded TLS private key for the client certificate referenced in tlsClientCert. The key \"tls.key\" is used to locate the data. If specified and the secret or expected key is not found, the identity provider is not honored. If the specified certificate data is not valid, the identity provider is not honored. The namespace for this secret is openshift-config.", +} + +func (OAuthRemoteConnectionInfo) SwaggerDoc() map[string]string { + return map_OAuthRemoteConnectionInfo +} + +var map_OAuthSpec = map[string]string{ + "": "OAuthSpec contains desired cluster auth configuration", + "identityProviders": "identityProviders is an ordered list of ways for a user to identify themselves. When this list is empty, no identities are provisioned for users.", + "tokenConfig": "tokenConfig contains options for authorization and access tokens", + "templates": "templates allow you to customize pages like the login page.", +} + +func (OAuthSpec) SwaggerDoc() map[string]string { + return map_OAuthSpec +} + +var map_OAuthStatus = map[string]string{ + "": "OAuthStatus shows current known state of OAuth server in the cluster", +} + +func (OAuthStatus) SwaggerDoc() map[string]string { + return map_OAuthStatus +} + +var map_OAuthTemplates = map[string]string{ + "": "OAuthTemplates allow for customization of pages like the login page", + "login": "login is the name of a secret that specifies a go template to use to render the login page. The key \"login.html\" is used to locate the template data. If specified and the secret or expected key is not found, the default login page is used. If the specified template is not valid, the default login page is used. If unspecified, the default login page is used. The namespace for this secret is openshift-config.", + "providerSelection": "providerSelection is the name of a secret that specifies a go template to use to render the provider selection page. The key \"providers.html\" is used to locate the template data. If specified and the secret or expected key is not found, the default provider selection page is used. If the specified template is not valid, the default provider selection page is used. If unspecified, the default provider selection page is used. The namespace for this secret is openshift-config.", + "error": "error is the name of a secret that specifies a go template to use to render error pages during the authentication or grant flow. The key \"errors.html\" is used to locate the template data. If specified and the secret or expected key is not found, the default error page is used. If the specified template is not valid, the default error page is used. If unspecified, the default error page is used. The namespace for this secret is openshift-config.", +} + +func (OAuthTemplates) SwaggerDoc() map[string]string { + return map_OAuthTemplates +} + +var map_OpenIDClaims = map[string]string{ + "": "OpenIDClaims contains a list of OpenID claims to use when authenticating with an OpenID identity provider", + "preferredUsername": "preferredUsername is the list of claims whose values should be used as the preferred username. If unspecified, the preferred username is determined from the value of the sub claim", + "name": "name is the list of claims whose values should be used as the display name. Optional. If unspecified, no display name is set for the identity", + "email": "email is the list of claims whose values should be used as the email address. Optional. If unspecified, no email is set for the identity", +} + +func (OpenIDClaims) SwaggerDoc() map[string]string { + return map_OpenIDClaims +} + +var map_OpenIDIdentityProvider = map[string]string{ + "": "OpenIDIdentityProvider provides identities for users authenticating using OpenID credentials", + "clientID": "clientID is the oauth client ID", + "clientSecret": "clientSecret is a required reference to the secret by name containing the oauth client secret. The key \"clientSecret\" is used to locate the data. If the secret or expected key is not found, the identity provider is not honored. The namespace for this secret is openshift-config.", + "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", +} + +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.", + "challengeURL": "challengeURL is a URL to redirect unauthenticated /authorize requests to Unauthenticated requests from OAuth clients which expect WWW-Authenticate challenges 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 challenge is set to true.", + "ca": "ca is a required 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. Specifically, it allows verification of incoming requests to prevent header spoofing. The key \"ca.crt\" is used to locate the data. If 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. The namespace for this config map is openshift-config.", + "clientCommonNames": "clientCommonNames is an optional list of common names to require a match from. If empty, any client certificate validated against the clientCA bundle is considered authoritative.", + "headers": "headers is the set of headers to check for identity information", + "preferredUsernameHeaders": "preferredUsernameHeaders is the set of headers to check for the preferred username", + "nameHeaders": "nameHeaders is the set of headers to check for the display name", + "emailHeaders": "emailHeaders is the set of headers to check for the email address", +} + +func (RequestHeaderIdentityProvider) SwaggerDoc() map[string]string { + return map_RequestHeaderIdentityProvider +} + +var map_TokenConfig = map[string]string{ + "": "TokenConfig holds the necessary configuration options for authorization and access tokens", + "accessTokenMaxAgeSeconds": "accessTokenMaxAgeSeconds defines the maximum age of access tokens", + "accessTokenInactivityTimeoutSeconds": "accessTokenInactivityTimeoutSeconds defines the default token inactivity timeout for tokens granted by any client. The value represents the maximum amount of time that can occur between consecutive uses of the token. Tokens become invalid if they are not used within this temporal window. The user will need to acquire a new token to regain access once a token times out. Valid values are integer values:\n x < 0 Tokens time out is enabled but tokens never timeout unless configured per client (e.g. `-1`)\n x = 0 Tokens time out is disabled (default)\n x > 0 Tokens time out if there is no activity for x seconds\nThe current minimum allowed value for X is 300 (5 minutes)", +} + +func (TokenConfig) SwaggerDoc() map[string]string { + return map_TokenConfig +} + +var map_Project = map[string]string{ + "": "Project holds cluster-wide information about Project. 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 (Project) SwaggerDoc() map[string]string { + return map_Project +} + +var map_ProjectList = map[string]string{ + "metadata": "Standard object's metadata.", +} + +func (ProjectList) SwaggerDoc() map[string]string { + return map_ProjectList +} + +var map_ProjectSpec = map[string]string{ + "": "ProjectSpec holds the project creation configuration.", + "projectRequestMessage": "projectRequestMessage is the string presented to a user if they are unable to request a project via the projectrequest api endpoint", + "projectRequestTemplate": "projectRequestTemplate is the template to use for creating projects in response to projectrequest. This must point to a template in 'openshift-config' namespace. It is optional. If it is not specified, a default template is used.", +} + +func (ProjectSpec) SwaggerDoc() map[string]string { + return map_ProjectSpec +} + +var map_TemplateReference = map[string]string{ + "": "TemplateReference references a template in a specific namespace. The namespace must be specified at the point of use.", + "name": "name is the metadata.name of the referenced project request template", +} + +func (TemplateReference) SwaggerDoc() map[string]string { + return map_TemplateReference +} + +var map_Proxy = map[string]string{ + "": "Proxy holds cluster-wide information on how to configure default proxies for the cluster. The canonical name is `cluster`", + "spec": "Spec holds user-settable values for the proxy configuration", +} + +func (Proxy) SwaggerDoc() map[string]string { + return map_Proxy +} + +var map_ProxyList = map[string]string{ + "metadata": "Standard object's metadata.", +} + +func (ProxyList) SwaggerDoc() map[string]string { + return map_ProxyList +} + +var map_ProxySpec = map[string]string{ + "httpProxy": "httpProxy is the URL of the proxy for HTTP requests. Empty means unset and will not result in an env var.", + "httpsProxy": "httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var.", + "noProxy": "noProxy is the list of domains for which the proxy should not be used. Empty means unset and will not result in an env var.", +} + +func (ProxySpec) SwaggerDoc() map[string]string { + return map_ProxySpec +} + +var map_Scheduling = map[string]string{ + "": "Scheduling holds cluster-wide information about Scheduling. 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 (Scheduling) SwaggerDoc() map[string]string { + return map_Scheduling +} + +var map_SchedulingList = map[string]string{ + "metadata": "Standard object's metadata.", +} + +func (SchedulingList) SwaggerDoc() map[string]string { + return map_SchedulingList +} + +var map_SchedulingSpec = 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.", +} + +func (SchedulingSpec) SwaggerDoc() map[string]string { + return map_SchedulingSpec +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/route/v1/types_swagger_doc_generated.go b/vendor/github.com/openshift/api/route/v1/zz_generated.swagger_doc_generated.go similarity index 99% rename from vendor/github.com/openshift/api/route/v1/types_swagger_doc_generated.go rename to vendor/github.com/openshift/api/route/v1/zz_generated.swagger_doc_generated.go index 8d9521737cb..f0727d93fde 100644 --- a/vendor/github.com/openshift/api/route/v1/types_swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/route/v1/zz_generated.swagger_doc_generated.go @@ -8,7 +8,7 @@ package v1 // they are on one line! For multiple line or blocks that you want to ignore use ---. // Any context after a --- is ignored. // -// Those methods can be generated by using hack/update-generated-swagger-docs.sh +// Those methods can be generated by using hack/update-swagger-docs.sh // AUTO-GENERATED FUNCTIONS START HERE var map_Route = map[string]string{ diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/clientset.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/clientset.go new file mode 100644 index 00000000000..6dbad4fc2a3 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/clientset.go @@ -0,0 +1,82 @@ +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + configv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + ConfigV1() configv1.ConfigV1Interface + // Deprecated: please explicitly pick a version if possible. + Config() configv1.ConfigV1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + configV1 *configv1.ConfigV1Client +} + +// ConfigV1 retrieves the ConfigV1Client +func (c *Clientset) ConfigV1() configv1.ConfigV1Interface { + return c.configV1 +} + +// Deprecated: Config retrieves the default version of ConfigClient. +// Please explicitly pick a version. +func (c *Clientset) Config() configv1.ConfigV1Interface { + return c.configV1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.configV1, err = configv1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.configV1 = configv1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.configV1 = configv1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/doc.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/doc.go new file mode 100644 index 00000000000..0e0c2a8900e --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated clientset. +package versioned diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/scheme/doc.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/scheme/doc.go new file mode 100644 index 00000000000..14db57a58f8 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/scheme/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/scheme/register.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/scheme/register.go new file mode 100644 index 00000000000..f07ab02de57 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/scheme/register.go @@ -0,0 +1,38 @@ +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + configv1 "github.com/openshift/api/config/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + AddToScheme(Scheme) +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +func AddToScheme(scheme *runtime.Scheme) { + configv1.AddToScheme(scheme) +} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/authentication.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/authentication.go new file mode 100644 index 00000000000..6556ba43fde --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/authentication.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" +) + +// AuthenticationsGetter has a method to return a AuthenticationInterface. +// A group's client should implement this interface. +type AuthenticationsGetter interface { + Authentications() AuthenticationInterface +} + +// AuthenticationInterface has methods to work with Authentication resources. +type AuthenticationInterface interface { + Create(*v1.Authentication) (*v1.Authentication, error) + Update(*v1.Authentication) (*v1.Authentication, error) + UpdateStatus(*v1.Authentication) (*v1.Authentication, 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.Authentication, error) + List(opts meta_v1.ListOptions) (*v1.AuthenticationList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Authentication, err error) + AuthenticationExpansion +} + +// authentications implements AuthenticationInterface +type authentications struct { + client rest.Interface +} + +// newAuthentications returns a Authentications +func newAuthentications(c *ConfigV1Client) *authentications { + return &authentications{ + client: c.RESTClient(), + } +} + +// Get takes name of the authentication, and returns the corresponding authentication object, and an error if there is any. +func (c *authentications) Get(name string, options meta_v1.GetOptions) (result *v1.Authentication, err error) { + result = &v1.Authentication{} + err = c.client.Get(). + Resource("authentications"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Authentications that match those selectors. +func (c *authentications) List(opts meta_v1.ListOptions) (result *v1.AuthenticationList, err error) { + result = &v1.AuthenticationList{} + err = c.client.Get(). + Resource("authentications"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested authentications. +func (c *authentications) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("authentications"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a authentication and creates it. Returns the server's representation of the authentication, and an error, if there is any. +func (c *authentications) Create(authentication *v1.Authentication) (result *v1.Authentication, err error) { + result = &v1.Authentication{} + err = c.client.Post(). + Resource("authentications"). + Body(authentication). + Do(). + Into(result) + return +} + +// Update takes the representation of a authentication and updates it. Returns the server's representation of the authentication, and an error, if there is any. +func (c *authentications) Update(authentication *v1.Authentication) (result *v1.Authentication, err error) { + result = &v1.Authentication{} + err = c.client.Put(). + Resource("authentications"). + Name(authentication.Name). + Body(authentication). + 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 *authentications) UpdateStatus(authentication *v1.Authentication) (result *v1.Authentication, err error) { + result = &v1.Authentication{} + err = c.client.Put(). + Resource("authentications"). + Name(authentication.Name). + SubResource("status"). + Body(authentication). + Do(). + Into(result) + return +} + +// Delete takes name of the authentication and deletes it. Returns an error if one occurs. +func (c *authentications) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Resource("authentications"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *authentications) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Resource("authentications"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched authentication. +func (c *authentications) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Authentication, err error) { + result = &v1.Authentication{} + err = c.client.Patch(pt). + Resource("authentications"). + 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/build.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/build.go new file mode 100644 index 00000000000..e70c1a5f8b1 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/build.go @@ -0,0 +1,131 @@ +// 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" +) + +// BuildsGetter has a method to return a BuildInterface. +// A group's client should implement this interface. +type BuildsGetter interface { + Builds() BuildInterface +} + +// BuildInterface has methods to work with Build resources. +type BuildInterface interface { + Create(*v1.Build) (*v1.Build, error) + Update(*v1.Build) (*v1.Build, 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.Build, error) + List(opts meta_v1.ListOptions) (*v1.BuildList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Build, err error) + BuildExpansion +} + +// builds implements BuildInterface +type builds struct { + client rest.Interface +} + +// newBuilds returns a Builds +func newBuilds(c *ConfigV1Client) *builds { + return &builds{ + client: c.RESTClient(), + } +} + +// Get takes name of the build, and returns the corresponding build object, and an error if there is any. +func (c *builds) Get(name string, options meta_v1.GetOptions) (result *v1.Build, err error) { + result = &v1.Build{} + err = c.client.Get(). + Resource("builds"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Builds that match those selectors. +func (c *builds) List(opts meta_v1.ListOptions) (result *v1.BuildList, err error) { + result = &v1.BuildList{} + err = c.client.Get(). + Resource("builds"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested builds. +func (c *builds) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("builds"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a build and creates it. Returns the server's representation of the build, and an error, if there is any. +func (c *builds) Create(build *v1.Build) (result *v1.Build, err error) { + result = &v1.Build{} + err = c.client.Post(). + Resource("builds"). + Body(build). + Do(). + Into(result) + return +} + +// Update takes the representation of a build and updates it. Returns the server's representation of the build, and an error, if there is any. +func (c *builds) Update(build *v1.Build) (result *v1.Build, err error) { + result = &v1.Build{} + err = c.client.Put(). + Resource("builds"). + Name(build.Name). + Body(build). + Do(). + Into(result) + return +} + +// Delete takes name of the build and deletes it. Returns an error if one occurs. +func (c *builds) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Resource("builds"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *builds) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Resource("builds"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched build. +func (c *builds) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Build, err error) { + result = &v1.Build{} + err = c.client.Patch(pt). + Resource("builds"). + 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/clusteroperator.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/clusteroperator.go new file mode 100644 index 00000000000..ee505bb7165 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/clusteroperator.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" +) + +// ClusterOperatorsGetter has a method to return a ClusterOperatorInterface. +// A group's client should implement this interface. +type ClusterOperatorsGetter interface { + ClusterOperators() ClusterOperatorInterface +} + +// ClusterOperatorInterface has methods to work with ClusterOperator resources. +type ClusterOperatorInterface interface { + Create(*v1.ClusterOperator) (*v1.ClusterOperator, error) + Update(*v1.ClusterOperator) (*v1.ClusterOperator, error) + UpdateStatus(*v1.ClusterOperator) (*v1.ClusterOperator, 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.ClusterOperator, error) + List(opts meta_v1.ListOptions) (*v1.ClusterOperatorList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterOperator, err error) + ClusterOperatorExpansion +} + +// clusterOperators implements ClusterOperatorInterface +type clusterOperators struct { + client rest.Interface +} + +// newClusterOperators returns a ClusterOperators +func newClusterOperators(c *ConfigV1Client) *clusterOperators { + return &clusterOperators{ + client: c.RESTClient(), + } +} + +// Get takes name of the clusterOperator, and returns the corresponding clusterOperator object, and an error if there is any. +func (c *clusterOperators) Get(name string, options meta_v1.GetOptions) (result *v1.ClusterOperator, err error) { + result = &v1.ClusterOperator{} + err = c.client.Get(). + Resource("clusteroperators"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ClusterOperators that match those selectors. +func (c *clusterOperators) List(opts meta_v1.ListOptions) (result *v1.ClusterOperatorList, err error) { + result = &v1.ClusterOperatorList{} + err = c.client.Get(). + Resource("clusteroperators"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested clusterOperators. +func (c *clusterOperators) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("clusteroperators"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a clusterOperator and creates it. Returns the server's representation of the clusterOperator, and an error, if there is any. +func (c *clusterOperators) Create(clusterOperator *v1.ClusterOperator) (result *v1.ClusterOperator, err error) { + result = &v1.ClusterOperator{} + err = c.client.Post(). + Resource("clusteroperators"). + Body(clusterOperator). + Do(). + Into(result) + return +} + +// Update takes the representation of a clusterOperator and updates it. Returns the server's representation of the clusterOperator, and an error, if there is any. +func (c *clusterOperators) Update(clusterOperator *v1.ClusterOperator) (result *v1.ClusterOperator, err error) { + result = &v1.ClusterOperator{} + err = c.client.Put(). + Resource("clusteroperators"). + Name(clusterOperator.Name). + Body(clusterOperator). + 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 *clusterOperators) UpdateStatus(clusterOperator *v1.ClusterOperator) (result *v1.ClusterOperator, err error) { + result = &v1.ClusterOperator{} + err = c.client.Put(). + Resource("clusteroperators"). + Name(clusterOperator.Name). + SubResource("status"). + Body(clusterOperator). + Do(). + Into(result) + return +} + +// Delete takes name of the clusterOperator and deletes it. Returns an error if one occurs. +func (c *clusterOperators) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Resource("clusteroperators"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *clusterOperators) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Resource("clusteroperators"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched clusterOperator. +func (c *clusterOperators) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterOperator, err error) { + result = &v1.ClusterOperator{} + err = c.client.Patch(pt). + Resource("clusteroperators"). + 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/clusterversion.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/clusterversion.go new file mode 100644 index 00000000000..30e4adef6b8 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/clusterversion.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" +) + +// ClusterVersionsGetter has a method to return a ClusterVersionInterface. +// A group's client should implement this interface. +type ClusterVersionsGetter interface { + ClusterVersions() ClusterVersionInterface +} + +// ClusterVersionInterface has methods to work with ClusterVersion resources. +type ClusterVersionInterface interface { + Create(*v1.ClusterVersion) (*v1.ClusterVersion, error) + Update(*v1.ClusterVersion) (*v1.ClusterVersion, error) + UpdateStatus(*v1.ClusterVersion) (*v1.ClusterVersion, 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.ClusterVersion, error) + List(opts meta_v1.ListOptions) (*v1.ClusterVersionList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterVersion, err error) + ClusterVersionExpansion +} + +// clusterVersions implements ClusterVersionInterface +type clusterVersions struct { + client rest.Interface +} + +// newClusterVersions returns a ClusterVersions +func newClusterVersions(c *ConfigV1Client) *clusterVersions { + return &clusterVersions{ + client: c.RESTClient(), + } +} + +// Get takes name of the clusterVersion, and returns the corresponding clusterVersion object, and an error if there is any. +func (c *clusterVersions) Get(name string, options meta_v1.GetOptions) (result *v1.ClusterVersion, err error) { + result = &v1.ClusterVersion{} + err = c.client.Get(). + Resource("clusterversions"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ClusterVersions that match those selectors. +func (c *clusterVersions) List(opts meta_v1.ListOptions) (result *v1.ClusterVersionList, err error) { + result = &v1.ClusterVersionList{} + err = c.client.Get(). + Resource("clusterversions"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested clusterVersions. +func (c *clusterVersions) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("clusterversions"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a clusterVersion and creates it. Returns the server's representation of the clusterVersion, and an error, if there is any. +func (c *clusterVersions) Create(clusterVersion *v1.ClusterVersion) (result *v1.ClusterVersion, err error) { + result = &v1.ClusterVersion{} + err = c.client.Post(). + Resource("clusterversions"). + Body(clusterVersion). + Do(). + Into(result) + return +} + +// Update takes the representation of a clusterVersion and updates it. Returns the server's representation of the clusterVersion, and an error, if there is any. +func (c *clusterVersions) Update(clusterVersion *v1.ClusterVersion) (result *v1.ClusterVersion, err error) { + result = &v1.ClusterVersion{} + err = c.client.Put(). + Resource("clusterversions"). + Name(clusterVersion.Name). + Body(clusterVersion). + 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 *clusterVersions) UpdateStatus(clusterVersion *v1.ClusterVersion) (result *v1.ClusterVersion, err error) { + result = &v1.ClusterVersion{} + err = c.client.Put(). + Resource("clusterversions"). + Name(clusterVersion.Name). + SubResource("status"). + Body(clusterVersion). + Do(). + Into(result) + return +} + +// Delete takes name of the clusterVersion and deletes it. Returns an error if one occurs. +func (c *clusterVersions) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Resource("clusterversions"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *clusterVersions) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Resource("clusterversions"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched clusterVersion. +func (c *clusterVersions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterVersion, err error) { + result = &v1.ClusterVersion{} + err = c.client.Patch(pt). + Resource("clusterversions"). + 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/config_client.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/config_client.go new file mode 100644 index 00000000000..e3df4140847 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/config_client.go @@ -0,0 +1,139 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "github.com/openshift/api/config/v1" + "github.com/openshift/client-go/config/clientset/versioned/scheme" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" +) + +type ConfigV1Interface interface { + RESTClient() rest.Interface + AuthenticationsGetter + BuildsGetter + ClusterOperatorsGetter + ClusterVersionsGetter + ConsolesGetter + DNSsGetter + ImagesGetter + InfrastructuresGetter + IngressesGetter + NetworksGetter + OAuthsGetter + ProjectsGetter + ProxiesGetter + SchedulingsGetter +} + +// ConfigV1Client is used to interact with features provided by the config.openshift.io group. +type ConfigV1Client struct { + restClient rest.Interface +} + +func (c *ConfigV1Client) Authentications() AuthenticationInterface { + return newAuthentications(c) +} + +func (c *ConfigV1Client) Builds() BuildInterface { + return newBuilds(c) +} + +func (c *ConfigV1Client) ClusterOperators() ClusterOperatorInterface { + return newClusterOperators(c) +} + +func (c *ConfigV1Client) ClusterVersions() ClusterVersionInterface { + return newClusterVersions(c) +} + +func (c *ConfigV1Client) Consoles() ConsoleInterface { + return newConsoles(c) +} + +func (c *ConfigV1Client) DNSs() DNSInterface { + return newDNSs(c) +} + +func (c *ConfigV1Client) Images() ImageInterface { + return newImages(c) +} + +func (c *ConfigV1Client) Infrastructures() InfrastructureInterface { + return newInfrastructures(c) +} + +func (c *ConfigV1Client) Ingresses() IngressInterface { + return newIngresses(c) +} + +func (c *ConfigV1Client) Networks() NetworkInterface { + return newNetworks(c) +} + +func (c *ConfigV1Client) OAuths() OAuthInterface { + return newOAuths(c) +} + +func (c *ConfigV1Client) Projects() ProjectInterface { + return newProjects(c) +} + +func (c *ConfigV1Client) Proxies() ProxyInterface { + return newProxies(c) +} + +func (c *ConfigV1Client) Schedulings() SchedulingInterface { + return newSchedulings(c) +} + +// NewForConfig creates a new ConfigV1Client for the given config. +func NewForConfig(c *rest.Config) (*ConfigV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &ConfigV1Client{client}, nil +} + +// NewForConfigOrDie creates a new ConfigV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *ConfigV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new ConfigV1Client for the given RESTClient. +func New(c rest.Interface) *ConfigV1Client { + return &ConfigV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *ConfigV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/console.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/console.go new file mode 100644 index 00000000000..b84013a6d34 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/console.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" +) + +// ConsolesGetter has a method to return a ConsoleInterface. +// A group's client should implement this interface. +type ConsolesGetter interface { + Consoles() ConsoleInterface +} + +// ConsoleInterface has methods to work with Console resources. +type ConsoleInterface interface { + Create(*v1.Console) (*v1.Console, error) + Update(*v1.Console) (*v1.Console, error) + UpdateStatus(*v1.Console) (*v1.Console, 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.Console, error) + List(opts meta_v1.ListOptions) (*v1.ConsoleList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Console, err error) + ConsoleExpansion +} + +// consoles implements ConsoleInterface +type consoles struct { + client rest.Interface +} + +// newConsoles returns a Consoles +func newConsoles(c *ConfigV1Client) *consoles { + return &consoles{ + client: c.RESTClient(), + } +} + +// Get takes name of the console, and returns the corresponding console object, and an error if there is any. +func (c *consoles) Get(name string, options meta_v1.GetOptions) (result *v1.Console, err error) { + result = &v1.Console{} + err = c.client.Get(). + Resource("consoles"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Consoles that match those selectors. +func (c *consoles) List(opts meta_v1.ListOptions) (result *v1.ConsoleList, err error) { + result = &v1.ConsoleList{} + err = c.client.Get(). + Resource("consoles"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested consoles. +func (c *consoles) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("consoles"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a console and creates it. Returns the server's representation of the console, and an error, if there is any. +func (c *consoles) Create(console *v1.Console) (result *v1.Console, err error) { + result = &v1.Console{} + err = c.client.Post(). + Resource("consoles"). + Body(console). + Do(). + Into(result) + return +} + +// Update takes the representation of a console and updates it. Returns the server's representation of the console, and an error, if there is any. +func (c *consoles) Update(console *v1.Console) (result *v1.Console, err error) { + result = &v1.Console{} + err = c.client.Put(). + Resource("consoles"). + Name(console.Name). + Body(console). + 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 *consoles) UpdateStatus(console *v1.Console) (result *v1.Console, err error) { + result = &v1.Console{} + err = c.client.Put(). + Resource("consoles"). + Name(console.Name). + SubResource("status"). + Body(console). + Do(). + Into(result) + return +} + +// Delete takes name of the console and deletes it. Returns an error if one occurs. +func (c *consoles) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Resource("consoles"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *consoles) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Resource("consoles"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched console. +func (c *consoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Console, err error) { + result = &v1.Console{} + err = c.client.Patch(pt). + Resource("consoles"). + 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/dns.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/dns.go new file mode 100644 index 00000000000..2d83cd32851 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/dns.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" +) + +// DNSsGetter has a method to return a DNSInterface. +// A group's client should implement this interface. +type DNSsGetter interface { + DNSs() DNSInterface +} + +// DNSInterface has methods to work with DNS resources. +type DNSInterface interface { + Create(*v1.DNS) (*v1.DNS, error) + Update(*v1.DNS) (*v1.DNS, error) + UpdateStatus(*v1.DNS) (*v1.DNS, 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.DNS, error) + List(opts meta_v1.ListOptions) (*v1.DNSList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DNS, err error) + DNSExpansion +} + +// dNSs implements DNSInterface +type dNSs struct { + client rest.Interface +} + +// newDNSs returns a DNSs +func newDNSs(c *ConfigV1Client) *dNSs { + return &dNSs{ + client: c.RESTClient(), + } +} + +// Get takes name of the dNS, and returns the corresponding dNS object, and an error if there is any. +func (c *dNSs) Get(name string, options meta_v1.GetOptions) (result *v1.DNS, err error) { + result = &v1.DNS{} + err = c.client.Get(). + Resource("dnss"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of DNSs that match those selectors. +func (c *dNSs) List(opts meta_v1.ListOptions) (result *v1.DNSList, err error) { + result = &v1.DNSList{} + err = c.client.Get(). + Resource("dnss"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested dNSs. +func (c *dNSs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("dnss"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a dNS and creates it. Returns the server's representation of the dNS, and an error, if there is any. +func (c *dNSs) Create(dNS *v1.DNS) (result *v1.DNS, err error) { + result = &v1.DNS{} + err = c.client.Post(). + Resource("dnss"). + Body(dNS). + Do(). + Into(result) + return +} + +// Update takes the representation of a dNS and updates it. Returns the server's representation of the dNS, and an error, if there is any. +func (c *dNSs) Update(dNS *v1.DNS) (result *v1.DNS, err error) { + result = &v1.DNS{} + err = c.client.Put(). + Resource("dnss"). + Name(dNS.Name). + Body(dNS). + 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 *dNSs) UpdateStatus(dNS *v1.DNS) (result *v1.DNS, err error) { + result = &v1.DNS{} + err = c.client.Put(). + Resource("dnss"). + Name(dNS.Name). + SubResource("status"). + Body(dNS). + Do(). + Into(result) + return +} + +// Delete takes name of the dNS and deletes it. Returns an error if one occurs. +func (c *dNSs) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Resource("dnss"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *dNSs) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Resource("dnss"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched dNS. +func (c *dNSs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DNS, err error) { + result = &v1.DNS{} + err = c.client.Patch(pt). + Resource("dnss"). + 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/doc.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/doc.go new file mode 100644 index 00000000000..225e6b2be34 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1 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 new file mode 100644 index 00000000000..7d1943e60ce --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/generated_expansion.go @@ -0,0 +1,31 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +type AuthenticationExpansion interface{} + +type BuildExpansion interface{} + +type ClusterOperatorExpansion interface{} + +type ClusterVersionExpansion interface{} + +type ConsoleExpansion interface{} + +type DNSExpansion interface{} + +type ImageExpansion interface{} + +type InfrastructureExpansion interface{} + +type IngressExpansion interface{} + +type NetworkExpansion interface{} + +type OAuthExpansion interface{} + +type ProjectExpansion interface{} + +type ProxyExpansion interface{} + +type SchedulingExpansion interface{} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/image.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/image.go new file mode 100644 index 00000000000..ff8597c2a8c --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/image.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" +) + +// ImagesGetter has a method to return a ImageInterface. +// A group's client should implement this interface. +type ImagesGetter interface { + Images() ImageInterface +} + +// ImageInterface has methods to work with Image resources. +type ImageInterface interface { + Create(*v1.Image) (*v1.Image, error) + Update(*v1.Image) (*v1.Image, error) + UpdateStatus(*v1.Image) (*v1.Image, 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.Image, error) + List(opts meta_v1.ListOptions) (*v1.ImageList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Image, err error) + ImageExpansion +} + +// images implements ImageInterface +type images struct { + client rest.Interface +} + +// newImages returns a Images +func newImages(c *ConfigV1Client) *images { + return &images{ + client: c.RESTClient(), + } +} + +// Get takes name of the image, and returns the corresponding image object, and an error if there is any. +func (c *images) Get(name string, options meta_v1.GetOptions) (result *v1.Image, err error) { + result = &v1.Image{} + err = c.client.Get(). + Resource("images"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Images that match those selectors. +func (c *images) List(opts meta_v1.ListOptions) (result *v1.ImageList, err error) { + result = &v1.ImageList{} + err = c.client.Get(). + Resource("images"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested images. +func (c *images) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("images"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a image and creates it. Returns the server's representation of the image, and an error, if there is any. +func (c *images) Create(image *v1.Image) (result *v1.Image, err error) { + result = &v1.Image{} + err = c.client.Post(). + Resource("images"). + Body(image). + Do(). + Into(result) + return +} + +// Update takes the representation of a image and updates it. Returns the server's representation of the image, and an error, if there is any. +func (c *images) Update(image *v1.Image) (result *v1.Image, err error) { + result = &v1.Image{} + err = c.client.Put(). + Resource("images"). + Name(image.Name). + Body(image). + 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 *images) UpdateStatus(image *v1.Image) (result *v1.Image, err error) { + result = &v1.Image{} + err = c.client.Put(). + Resource("images"). + Name(image.Name). + SubResource("status"). + Body(image). + Do(). + Into(result) + return +} + +// Delete takes name of the image and deletes it. Returns an error if one occurs. +func (c *images) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Resource("images"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *images) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Resource("images"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched image. +func (c *images) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Image, err error) { + result = &v1.Image{} + err = c.client.Patch(pt). + Resource("images"). + 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/infrastructure.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/infrastructure.go new file mode 100644 index 00000000000..b30f03e8e38 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/infrastructure.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" +) + +// InfrastructuresGetter has a method to return a InfrastructureInterface. +// A group's client should implement this interface. +type InfrastructuresGetter interface { + Infrastructures() InfrastructureInterface +} + +// InfrastructureInterface has methods to work with Infrastructure resources. +type InfrastructureInterface interface { + Create(*v1.Infrastructure) (*v1.Infrastructure, error) + Update(*v1.Infrastructure) (*v1.Infrastructure, error) + UpdateStatus(*v1.Infrastructure) (*v1.Infrastructure, 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.Infrastructure, error) + List(opts meta_v1.ListOptions) (*v1.InfrastructureList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Infrastructure, err error) + InfrastructureExpansion +} + +// infrastructures implements InfrastructureInterface +type infrastructures struct { + client rest.Interface +} + +// newInfrastructures returns a Infrastructures +func newInfrastructures(c *ConfigV1Client) *infrastructures { + return &infrastructures{ + client: c.RESTClient(), + } +} + +// Get takes name of the infrastructure, and returns the corresponding infrastructure object, and an error if there is any. +func (c *infrastructures) Get(name string, options meta_v1.GetOptions) (result *v1.Infrastructure, err error) { + result = &v1.Infrastructure{} + err = c.client.Get(). + Resource("infrastructures"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Infrastructures that match those selectors. +func (c *infrastructures) List(opts meta_v1.ListOptions) (result *v1.InfrastructureList, err error) { + result = &v1.InfrastructureList{} + err = c.client.Get(). + Resource("infrastructures"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested infrastructures. +func (c *infrastructures) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("infrastructures"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a infrastructure and creates it. Returns the server's representation of the infrastructure, and an error, if there is any. +func (c *infrastructures) Create(infrastructure *v1.Infrastructure) (result *v1.Infrastructure, err error) { + result = &v1.Infrastructure{} + err = c.client.Post(). + Resource("infrastructures"). + Body(infrastructure). + Do(). + Into(result) + return +} + +// Update takes the representation of a infrastructure and updates it. Returns the server's representation of the infrastructure, and an error, if there is any. +func (c *infrastructures) Update(infrastructure *v1.Infrastructure) (result *v1.Infrastructure, err error) { + result = &v1.Infrastructure{} + err = c.client.Put(). + Resource("infrastructures"). + Name(infrastructure.Name). + Body(infrastructure). + 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 *infrastructures) UpdateStatus(infrastructure *v1.Infrastructure) (result *v1.Infrastructure, err error) { + result = &v1.Infrastructure{} + err = c.client.Put(). + Resource("infrastructures"). + Name(infrastructure.Name). + SubResource("status"). + Body(infrastructure). + Do(). + Into(result) + return +} + +// Delete takes name of the infrastructure and deletes it. Returns an error if one occurs. +func (c *infrastructures) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Resource("infrastructures"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *infrastructures) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Resource("infrastructures"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched infrastructure. +func (c *infrastructures) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Infrastructure, err error) { + result = &v1.Infrastructure{} + err = c.client.Patch(pt). + Resource("infrastructures"). + 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/ingress.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/ingress.go new file mode 100644 index 00000000000..5b66b9c69af --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/ingress.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" +) + +// IngressesGetter has a method to return a IngressInterface. +// A group's client should implement this interface. +type IngressesGetter interface { + Ingresses() IngressInterface +} + +// IngressInterface has methods to work with Ingress resources. +type IngressInterface interface { + Create(*v1.Ingress) (*v1.Ingress, error) + Update(*v1.Ingress) (*v1.Ingress, error) + UpdateStatus(*v1.Ingress) (*v1.Ingress, 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.Ingress, error) + List(opts meta_v1.ListOptions) (*v1.IngressList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Ingress, err error) + IngressExpansion +} + +// ingresses implements IngressInterface +type ingresses struct { + client rest.Interface +} + +// newIngresses returns a Ingresses +func newIngresses(c *ConfigV1Client) *ingresses { + return &ingresses{ + client: c.RESTClient(), + } +} + +// Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any. +func (c *ingresses) Get(name string, options meta_v1.GetOptions) (result *v1.Ingress, err error) { + result = &v1.Ingress{} + err = c.client.Get(). + Resource("ingresses"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Ingresses that match those selectors. +func (c *ingresses) List(opts meta_v1.ListOptions) (result *v1.IngressList, err error) { + result = &v1.IngressList{} + err = c.client.Get(). + Resource("ingresses"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested ingresses. +func (c *ingresses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("ingresses"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any. +func (c *ingresses) Create(ingress *v1.Ingress) (result *v1.Ingress, err error) { + result = &v1.Ingress{} + err = c.client.Post(). + Resource("ingresses"). + Body(ingress). + Do(). + Into(result) + return +} + +// Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any. +func (c *ingresses) Update(ingress *v1.Ingress) (result *v1.Ingress, err error) { + result = &v1.Ingress{} + err = c.client.Put(). + Resource("ingresses"). + Name(ingress.Name). + Body(ingress). + 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 *ingresses) UpdateStatus(ingress *v1.Ingress) (result *v1.Ingress, err error) { + result = &v1.Ingress{} + err = c.client.Put(). + Resource("ingresses"). + Name(ingress.Name). + SubResource("status"). + Body(ingress). + Do(). + Into(result) + return +} + +// Delete takes name of the ingress and deletes it. Returns an error if one occurs. +func (c *ingresses) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Resource("ingresses"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *ingresses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Resource("ingresses"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched ingress. +func (c *ingresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Ingress, err error) { + result = &v1.Ingress{} + err = c.client.Patch(pt). + Resource("ingresses"). + 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/network.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/network.go new file mode 100644 index 00000000000..7d50be2d13c --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/network.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" +) + +// NetworksGetter has a method to return a NetworkInterface. +// A group's client should implement this interface. +type NetworksGetter interface { + Networks() NetworkInterface +} + +// NetworkInterface has methods to work with Network resources. +type NetworkInterface interface { + Create(*v1.Network) (*v1.Network, error) + Update(*v1.Network) (*v1.Network, error) + UpdateStatus(*v1.Network) (*v1.Network, 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.Network, error) + List(opts meta_v1.ListOptions) (*v1.NetworkList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Network, err error) + NetworkExpansion +} + +// networks implements NetworkInterface +type networks struct { + client rest.Interface +} + +// newNetworks returns a Networks +func newNetworks(c *ConfigV1Client) *networks { + return &networks{ + client: c.RESTClient(), + } +} + +// Get takes name of the network, and returns the corresponding network object, and an error if there is any. +func (c *networks) Get(name string, options meta_v1.GetOptions) (result *v1.Network, err error) { + result = &v1.Network{} + err = c.client.Get(). + Resource("networks"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Networks that match those selectors. +func (c *networks) List(opts meta_v1.ListOptions) (result *v1.NetworkList, err error) { + result = &v1.NetworkList{} + err = c.client.Get(). + Resource("networks"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested networks. +func (c *networks) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("networks"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a network and creates it. Returns the server's representation of the network, and an error, if there is any. +func (c *networks) Create(network *v1.Network) (result *v1.Network, err error) { + result = &v1.Network{} + err = c.client.Post(). + Resource("networks"). + Body(network). + Do(). + Into(result) + return +} + +// Update takes the representation of a network and updates it. Returns the server's representation of the network, and an error, if there is any. +func (c *networks) Update(network *v1.Network) (result *v1.Network, err error) { + result = &v1.Network{} + err = c.client.Put(). + Resource("networks"). + Name(network.Name). + Body(network). + 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 *networks) UpdateStatus(network *v1.Network) (result *v1.Network, err error) { + result = &v1.Network{} + err = c.client.Put(). + Resource("networks"). + Name(network.Name). + SubResource("status"). + Body(network). + Do(). + Into(result) + return +} + +// Delete takes name of the network and deletes it. Returns an error if one occurs. +func (c *networks) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Resource("networks"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *networks) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Resource("networks"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched network. +func (c *networks) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Network, err error) { + result = &v1.Network{} + err = c.client.Patch(pt). + Resource("networks"). + 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/oauth.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/oauth.go new file mode 100644 index 00000000000..d6c227bfc4d --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/oauth.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" +) + +// OAuthsGetter has a method to return a OAuthInterface. +// A group's client should implement this interface. +type OAuthsGetter interface { + OAuths() OAuthInterface +} + +// OAuthInterface has methods to work with OAuth resources. +type OAuthInterface interface { + Create(*v1.OAuth) (*v1.OAuth, error) + Update(*v1.OAuth) (*v1.OAuth, error) + UpdateStatus(*v1.OAuth) (*v1.OAuth, 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.OAuth, error) + List(opts meta_v1.ListOptions) (*v1.OAuthList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.OAuth, err error) + OAuthExpansion +} + +// oAuths implements OAuthInterface +type oAuths struct { + client rest.Interface +} + +// newOAuths returns a OAuths +func newOAuths(c *ConfigV1Client) *oAuths { + return &oAuths{ + client: c.RESTClient(), + } +} + +// Get takes name of the oAuth, and returns the corresponding oAuth object, and an error if there is any. +func (c *oAuths) Get(name string, options meta_v1.GetOptions) (result *v1.OAuth, err error) { + result = &v1.OAuth{} + err = c.client.Get(). + Resource("oauths"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of OAuths that match those selectors. +func (c *oAuths) List(opts meta_v1.ListOptions) (result *v1.OAuthList, err error) { + result = &v1.OAuthList{} + err = c.client.Get(). + Resource("oauths"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested oAuths. +func (c *oAuths) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("oauths"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a oAuth and creates it. Returns the server's representation of the oAuth, and an error, if there is any. +func (c *oAuths) Create(oAuth *v1.OAuth) (result *v1.OAuth, err error) { + result = &v1.OAuth{} + err = c.client.Post(). + Resource("oauths"). + Body(oAuth). + Do(). + Into(result) + return +} + +// Update takes the representation of a oAuth and updates it. Returns the server's representation of the oAuth, and an error, if there is any. +func (c *oAuths) Update(oAuth *v1.OAuth) (result *v1.OAuth, err error) { + result = &v1.OAuth{} + err = c.client.Put(). + Resource("oauths"). + Name(oAuth.Name). + Body(oAuth). + 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 *oAuths) UpdateStatus(oAuth *v1.OAuth) (result *v1.OAuth, err error) { + result = &v1.OAuth{} + err = c.client.Put(). + Resource("oauths"). + Name(oAuth.Name). + SubResource("status"). + Body(oAuth). + Do(). + Into(result) + return +} + +// Delete takes name of the oAuth and deletes it. Returns an error if one occurs. +func (c *oAuths) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Resource("oauths"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *oAuths) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Resource("oauths"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched oAuth. +func (c *oAuths) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.OAuth, err error) { + result = &v1.OAuth{} + err = c.client.Patch(pt). + Resource("oauths"). + 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/project.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/project.go new file mode 100644 index 00000000000..0161002ff29 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/project.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" +) + +// ProjectsGetter has a method to return a ProjectInterface. +// A group's client should implement this interface. +type ProjectsGetter interface { + Projects() ProjectInterface +} + +// ProjectInterface has methods to work with Project resources. +type ProjectInterface interface { + Create(*v1.Project) (*v1.Project, error) + Update(*v1.Project) (*v1.Project, error) + UpdateStatus(*v1.Project) (*v1.Project, 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.Project, error) + List(opts meta_v1.ListOptions) (*v1.ProjectList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Project, err error) + ProjectExpansion +} + +// projects implements ProjectInterface +type projects struct { + client rest.Interface +} + +// newProjects returns a Projects +func newProjects(c *ConfigV1Client) *projects { + return &projects{ + client: c.RESTClient(), + } +} + +// Get takes name of the project, and returns the corresponding project object, and an error if there is any. +func (c *projects) Get(name string, options meta_v1.GetOptions) (result *v1.Project, err error) { + result = &v1.Project{} + err = c.client.Get(). + Resource("projects"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Projects that match those selectors. +func (c *projects) List(opts meta_v1.ListOptions) (result *v1.ProjectList, err error) { + result = &v1.ProjectList{} + err = c.client.Get(). + Resource("projects"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested projects. +func (c *projects) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("projects"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a project and creates it. Returns the server's representation of the project, and an error, if there is any. +func (c *projects) Create(project *v1.Project) (result *v1.Project, err error) { + result = &v1.Project{} + err = c.client.Post(). + Resource("projects"). + Body(project). + Do(). + Into(result) + return +} + +// Update takes the representation of a project and updates it. Returns the server's representation of the project, and an error, if there is any. +func (c *projects) Update(project *v1.Project) (result *v1.Project, err error) { + result = &v1.Project{} + err = c.client.Put(). + Resource("projects"). + Name(project.Name). + Body(project). + 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 *projects) UpdateStatus(project *v1.Project) (result *v1.Project, err error) { + result = &v1.Project{} + err = c.client.Put(). + Resource("projects"). + Name(project.Name). + SubResource("status"). + Body(project). + Do(). + Into(result) + return +} + +// Delete takes name of the project and deletes it. Returns an error if one occurs. +func (c *projects) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Resource("projects"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *projects) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Resource("projects"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched project. +func (c *projects) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Project, err error) { + result = &v1.Project{} + err = c.client.Patch(pt). + Resource("projects"). + 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/proxy.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/proxy.go new file mode 100644 index 00000000000..fca9ed9a299 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/proxy.go @@ -0,0 +1,131 @@ +// 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" +) + +// ProxiesGetter has a method to return a ProxyInterface. +// A group's client should implement this interface. +type ProxiesGetter interface { + Proxies() ProxyInterface +} + +// ProxyInterface has methods to work with Proxy resources. +type ProxyInterface interface { + Create(*v1.Proxy) (*v1.Proxy, error) + Update(*v1.Proxy) (*v1.Proxy, 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.Proxy, error) + List(opts meta_v1.ListOptions) (*v1.ProxyList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Proxy, err error) + ProxyExpansion +} + +// proxies implements ProxyInterface +type proxies struct { + client rest.Interface +} + +// newProxies returns a Proxies +func newProxies(c *ConfigV1Client) *proxies { + return &proxies{ + client: c.RESTClient(), + } +} + +// Get takes name of the proxy, and returns the corresponding proxy object, and an error if there is any. +func (c *proxies) Get(name string, options meta_v1.GetOptions) (result *v1.Proxy, err error) { + result = &v1.Proxy{} + err = c.client.Get(). + Resource("proxies"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Proxies that match those selectors. +func (c *proxies) List(opts meta_v1.ListOptions) (result *v1.ProxyList, err error) { + result = &v1.ProxyList{} + err = c.client.Get(). + Resource("proxies"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested proxies. +func (c *proxies) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("proxies"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a proxy and creates it. Returns the server's representation of the proxy, and an error, if there is any. +func (c *proxies) Create(proxy *v1.Proxy) (result *v1.Proxy, err error) { + result = &v1.Proxy{} + err = c.client.Post(). + Resource("proxies"). + Body(proxy). + Do(). + Into(result) + return +} + +// Update takes the representation of a proxy and updates it. Returns the server's representation of the proxy, and an error, if there is any. +func (c *proxies) Update(proxy *v1.Proxy) (result *v1.Proxy, err error) { + result = &v1.Proxy{} + err = c.client.Put(). + Resource("proxies"). + Name(proxy.Name). + Body(proxy). + Do(). + Into(result) + return +} + +// Delete takes name of the proxy and deletes it. Returns an error if one occurs. +func (c *proxies) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Resource("proxies"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *proxies) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Resource("proxies"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched proxy. +func (c *proxies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Proxy, err error) { + result = &v1.Proxy{} + err = c.client.Patch(pt). + Resource("proxies"). + 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/scheduling.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/scheduling.go new file mode 100644 index 00000000000..398c76bd136 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/scheduling.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" +) + +// SchedulingsGetter has a method to return a SchedulingInterface. +// A group's client should implement this interface. +type SchedulingsGetter interface { + Schedulings() SchedulingInterface +} + +// SchedulingInterface has methods to work with Scheduling resources. +type SchedulingInterface interface { + Create(*v1.Scheduling) (*v1.Scheduling, error) + Update(*v1.Scheduling) (*v1.Scheduling, error) + UpdateStatus(*v1.Scheduling) (*v1.Scheduling, 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.Scheduling, error) + List(opts meta_v1.ListOptions) (*v1.SchedulingList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Scheduling, err error) + SchedulingExpansion +} + +// schedulings implements SchedulingInterface +type schedulings struct { + client rest.Interface +} + +// newSchedulings returns a Schedulings +func newSchedulings(c *ConfigV1Client) *schedulings { + return &schedulings{ + client: c.RESTClient(), + } +} + +// Get takes name of the scheduling, and returns the corresponding scheduling object, and an error if there is any. +func (c *schedulings) Get(name string, options meta_v1.GetOptions) (result *v1.Scheduling, err error) { + result = &v1.Scheduling{} + err = c.client.Get(). + Resource("schedulings"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Schedulings that match those selectors. +func (c *schedulings) List(opts meta_v1.ListOptions) (result *v1.SchedulingList, err error) { + result = &v1.SchedulingList{} + err = c.client.Get(). + Resource("schedulings"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested schedulings. +func (c *schedulings) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("schedulings"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a scheduling and creates it. Returns the server's representation of the scheduling, and an error, if there is any. +func (c *schedulings) Create(scheduling *v1.Scheduling) (result *v1.Scheduling, err error) { + result = &v1.Scheduling{} + err = c.client.Post(). + Resource("schedulings"). + Body(scheduling). + Do(). + Into(result) + return +} + +// Update takes the representation of a scheduling and updates it. Returns the server's representation of the scheduling, and an error, if there is any. +func (c *schedulings) Update(scheduling *v1.Scheduling) (result *v1.Scheduling, err error) { + result = &v1.Scheduling{} + err = c.client.Put(). + Resource("schedulings"). + Name(scheduling.Name). + Body(scheduling). + 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 *schedulings) UpdateStatus(scheduling *v1.Scheduling) (result *v1.Scheduling, err error) { + result = &v1.Scheduling{} + err = c.client.Put(). + Resource("schedulings"). + Name(scheduling.Name). + SubResource("status"). + Body(scheduling). + Do(). + Into(result) + return +} + +// Delete takes name of the scheduling and deletes it. Returns an error if one occurs. +func (c *schedulings) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Resource("schedulings"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *schedulings) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Resource("schedulings"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched scheduling. +func (c *schedulings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Scheduling, err error) { + result = &v1.Scheduling{} + err = c.client.Patch(pt). + Resource("schedulings"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/github.com/openshift/client-go/route/clientset/versioned/clientset.go b/vendor/github.com/openshift/client-go/route/clientset/versioned/clientset.go index 9e31fdb7832..9fabc4689f7 100644 --- a/vendor/github.com/openshift/client-go/route/clientset/versioned/clientset.go +++ b/vendor/github.com/openshift/client-go/route/clientset/versioned/clientset.go @@ -1,7 +1,8 @@ +// Code generated by client-gen. DO NOT EDIT. + package versioned import ( - glog "github.com/golang/glog" routev1 "github.com/openshift/client-go/route/clientset/versioned/typed/route/v1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" @@ -56,7 +57,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { - glog.Errorf("failed to create the DiscoveryClient: %v", err) return nil, err } return &cs, nil diff --git a/vendor/github.com/openshift/client-go/route/clientset/versioned/doc.go b/vendor/github.com/openshift/client-go/route/clientset/versioned/doc.go index 2a3e4c6f564..0e0c2a8900e 100644 --- a/vendor/github.com/openshift/client-go/route/clientset/versioned/doc.go +++ b/vendor/github.com/openshift/client-go/route/clientset/versioned/doc.go @@ -1,2 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated clientset. package versioned diff --git a/vendor/github.com/openshift/client-go/route/clientset/versioned/scheme/doc.go b/vendor/github.com/openshift/client-go/route/clientset/versioned/scheme/doc.go index d6cdaa7cd03..14db57a58f8 100644 --- a/vendor/github.com/openshift/client-go/route/clientset/versioned/scheme/doc.go +++ b/vendor/github.com/openshift/client-go/route/clientset/versioned/scheme/doc.go @@ -1,2 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + // This package contains the scheme of the automatically generated clientset. package scheme diff --git a/vendor/github.com/openshift/client-go/route/clientset/versioned/scheme/register.go b/vendor/github.com/openshift/client-go/route/clientset/versioned/scheme/register.go index 48f7bf04308..e49dd01ebd0 100644 --- a/vendor/github.com/openshift/client-go/route/clientset/versioned/scheme/register.go +++ b/vendor/github.com/openshift/client-go/route/clientset/versioned/scheme/register.go @@ -1,3 +1,5 @@ +// Code generated by client-gen. DO NOT EDIT. + package scheme import ( @@ -22,7 +24,7 @@ func init() { // // import ( // "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kuberentes/scheme" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" // aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" // ) // @@ -33,5 +35,4 @@ func init() { // correctly. func AddToScheme(scheme *runtime.Scheme) { routev1.AddToScheme(scheme) - } diff --git a/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/doc.go b/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/doc.go index 56eebff4fa6..225e6b2be34 100644 --- a/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/doc.go +++ b/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/doc.go @@ -1,2 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1 diff --git a/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/generated_expansion.go b/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/generated_expansion.go index 564f1c268d1..4f2173b6fc5 100644 --- a/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/generated_expansion.go +++ b/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/generated_expansion.go @@ -1,3 +1,5 @@ +// Code generated by client-gen. DO NOT EDIT. + package v1 type RouteExpansion interface{} diff --git a/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/route.go b/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/route.go index 723f762fa67..9ce959bad0c 100644 --- a/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/route.go +++ b/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/route.go @@ -1,3 +1,5 @@ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( diff --git a/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/route_client.go b/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/route_client.go index cee30ee45bb..185e5b9a218 100644 --- a/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/route_client.go +++ b/vendor/github.com/openshift/client-go/route/clientset/versioned/typed/route/v1/route_client.go @@ -1,3 +1,5 @@ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( From f808119f029a8e864714a6afe69ab16040207f43 Mon Sep 17 00:00:00 2001 From: staebler Date: Tue, 29 Jan 2019 10:40:13 -0500 Subject: [PATCH 2/3] vendor: add openshift/library-go Vendor openshift/library-go for access to helper functions for evaluating the status conditions of the ClusterVersion object. --- Gopkg.lock | 14 +- .../github.com/openshift/library-go/LICENSE | 201 ++++++++++++++++++ .../clusteroperator/v1helpers/status.go | 140 ++++++++++++ .../apimachinery/pkg/api/equality/semantic.go | 49 +++++ 4 files changed, 403 insertions(+), 1 deletion(-) create mode 100644 vendor/github.com/openshift/library-go/LICENSE create mode 100644 vendor/github.com/openshift/library-go/pkg/config/clusteroperator/v1helpers/status.go create mode 100644 vendor/k8s.io/apimachinery/pkg/api/equality/semantic.go diff --git a/Gopkg.lock b/Gopkg.lock index 7c7170e7f6b..96f2a6fad67 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -410,6 +410,14 @@ pruneopts = "NUT" revision = "fb8b55a1072436a51b153de9acf5bf5525efcf83" +[[projects]] + branch = "master" + digest = "1:a32828cebfa63f79265d9062005c23f3c737def9e8a956ddd5dc3fd5f4caffe6" + name = "github.com/openshift/library-go" + packages = ["pkg/config/clusteroperator/v1helpers"] + pruneopts = "NUT" + revision = "4b9f6ceb6598ebd4dd6c9385ef024abf7a18159b" + [[projects]] digest = "1:93b1d84c5fa6d1ea52f4114c37714cddd84d5b78f151b62bb101128dd51399bf" name = "github.com/pborman/uuid" @@ -684,9 +692,10 @@ revision = "7c111c89a854dfd8ba47d0bfdbe352bc85951011" [[projects]] - digest = "1:db1a4cd5c12f340d0779da16d2d5ae2419b1a470d010fc988e5e345b8c7f494c" + digest = "1:059e5dfce6269a3e87f2df7edab3075f17efb4d1d17c1b4d8530cac5f0af7b9c" name = "k8s.io/apimachinery" packages = [ + "pkg/api/equality", "pkg/api/errors", "pkg/api/meta", "pkg/api/resource", @@ -891,6 +900,7 @@ "github.com/openshift/client-go/route/clientset/versioned", "github.com/openshift/cluster-api-provider-libvirt/pkg/apis/libvirtproviderconfig/v1alpha1", "github.com/openshift/cluster-network-operator/pkg/apis/networkoperator/v1", + "github.com/openshift/library-go/pkg/config/clusteroperator/v1helpers", "github.com/pborman/uuid", "github.com/peterbourgon/diskv", "github.com/pkg/errors", @@ -908,6 +918,7 @@ "k8s.io/api/core/v1", "k8s.io/apimachinery/pkg/api/errors", "k8s.io/apimachinery/pkg/apis/meta/v1", + "k8s.io/apimachinery/pkg/fields", "k8s.io/apimachinery/pkg/runtime", "k8s.io/apimachinery/pkg/util/errors", "k8s.io/apimachinery/pkg/util/sets", @@ -917,6 +928,7 @@ "k8s.io/apimachinery/pkg/watch", "k8s.io/client-go/kubernetes", "k8s.io/client-go/rest", + "k8s.io/client-go/tools/cache", "k8s.io/client-go/tools/clientcmd", "k8s.io/client-go/tools/clientcmd/api/v1", "k8s.io/client-go/tools/watch", diff --git a/vendor/github.com/openshift/library-go/LICENSE b/vendor/github.com/openshift/library-go/LICENSE new file mode 100644 index 00000000000..261eeb9e9f8 --- /dev/null +++ b/vendor/github.com/openshift/library-go/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/openshift/library-go/pkg/config/clusteroperator/v1helpers/status.go b/vendor/github.com/openshift/library-go/pkg/config/clusteroperator/v1helpers/status.go new file mode 100644 index 00000000000..49390ae831d --- /dev/null +++ b/vendor/github.com/openshift/library-go/pkg/config/clusteroperator/v1helpers/status.go @@ -0,0 +1,140 @@ +package v1 + +import ( + "bytes" + "fmt" + "strings" + "time" + + "k8s.io/apimachinery/pkg/api/equality" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/apimachinery/pkg/util/json" + + configv1 "github.com/openshift/api/config/v1" +) + +// SetStatusCondition sets the corresponding condition in conditions to newCondition. +func SetStatusCondition(conditions *[]configv1.ClusterOperatorStatusCondition, newCondition configv1.ClusterOperatorStatusCondition) { + if conditions == nil { + conditions = &[]configv1.ClusterOperatorStatusCondition{} + } + existingCondition := FindStatusCondition(*conditions, newCondition.Type) + if existingCondition == nil { + newCondition.LastTransitionTime = metav1.NewTime(time.Now()) + *conditions = append(*conditions, newCondition) + return + } + + if existingCondition.Status != newCondition.Status { + existingCondition.Status = newCondition.Status + existingCondition.LastTransitionTime = metav1.NewTime(time.Now()) + } + + existingCondition.Reason = newCondition.Reason + existingCondition.Message = newCondition.Message +} + +// RemoveStatusCondition removes the corresponding conditionType from conditions. +func RemoveStatusCondition(conditions *[]configv1.ClusterOperatorStatusCondition, conditionType configv1.ClusterStatusConditionType) { + if conditions == nil { + conditions = &[]configv1.ClusterOperatorStatusCondition{} + } + newConditions := []configv1.ClusterOperatorStatusCondition{} + for _, condition := range *conditions { + if condition.Type != conditionType { + newConditions = append(newConditions, condition) + } + } + + *conditions = newConditions +} + +// FindStatusCondition finds the conditionType in conditions. +func FindStatusCondition(conditions []configv1.ClusterOperatorStatusCondition, conditionType configv1.ClusterStatusConditionType) *configv1.ClusterOperatorStatusCondition { + for i := range conditions { + if conditions[i].Type == conditionType { + return &conditions[i] + } + } + + return nil +} + +// GetStatusDiff returns a string representing change in condition status in human readable form. +func GetStatusDiff(oldStatus configv1.ClusterOperatorStatus, newStatus configv1.ClusterOperatorStatus) string { + messages := []string{} + for _, newCondition := range newStatus.Conditions { + existingStatusCondition := FindStatusCondition(oldStatus.Conditions, newCondition.Type) + if existingStatusCondition == nil { + messages = append(messages, fmt.Sprintf("%s set to %s (%q)", newCondition.Type, newCondition.Status, newCondition.Message)) + continue + } + if existingStatusCondition.Status != newCondition.Status { + messages = append(messages, fmt.Sprintf("%s changed from %s to %s (%q)", existingStatusCondition.Type, existingStatusCondition.Status, newCondition.Status, newCondition.Message)) + continue + } + if existingStatusCondition.Message != newCondition.Message { + messages = append(messages, fmt.Sprintf("%s message changed from %q to %q", existingStatusCondition.Type, existingStatusCondition.Message, newCondition.Message)) + } + } + for _, oldCondition := range oldStatus.Conditions { + // This should not happen. It means we removed old condition entirely instead of just changing its status + if c := FindStatusCondition(newStatus.Conditions, oldCondition.Type); c == nil { + messages = append(messages, fmt.Sprintf("%s was removed", oldCondition.Type)) + } + } + + if !equality.Semantic.DeepEqual(oldStatus.RelatedObjects, newStatus.RelatedObjects) { + messages = append(messages, fmt.Sprintf("status.relatedObjects changed from %q to %q", oldStatus.RelatedObjects, newStatus.RelatedObjects)) + } + if !equality.Semantic.DeepEqual(oldStatus.Extension, newStatus.Extension) { + messages = append(messages, fmt.Sprintf("status.extension changed from %q to %q", oldStatus.Extension, newStatus.Extension)) + } + + if len(messages) == 0 { + // ignore errors + originalJSON := &bytes.Buffer{} + json.NewEncoder(originalJSON).Encode(oldStatus) + newJSON := &bytes.Buffer{} + json.NewEncoder(newJSON).Encode(newStatus) + messages = append(messages, diff.StringDiff(originalJSON.String(), newJSON.String())) + } + + return strings.Join(messages, ",") +} + +// IsStatusConditionTrue returns true when the conditionType is present and set to `configv1.ConditionTrue` +func IsStatusConditionTrue(conditions []configv1.ClusterOperatorStatusCondition, conditionType configv1.ClusterStatusConditionType) bool { + return IsStatusConditionPresentAndEqual(conditions, conditionType, configv1.ConditionTrue) +} + +// IsStatusConditionFalse returns true when the conditionType is present and set to `configv1.ConditionFalse` +func IsStatusConditionFalse(conditions []configv1.ClusterOperatorStatusCondition, conditionType configv1.ClusterStatusConditionType) bool { + return IsStatusConditionPresentAndEqual(conditions, conditionType, configv1.ConditionFalse) +} + +// IsStatusConditionPresentAndEqual returns true when conditionType is present and equal to status. +func IsStatusConditionPresentAndEqual(conditions []configv1.ClusterOperatorStatusCondition, conditionType configv1.ClusterStatusConditionType, status configv1.ConditionStatus) bool { + for _, condition := range conditions { + if condition.Type == conditionType { + return condition.Status == status + } + } + return false +} + +// IsStatusConditionNotIn returns true when the conditionType does not match the status. +func IsStatusConditionNotIn(conditions []configv1.ClusterOperatorStatusCondition, conditionType configv1.ClusterStatusConditionType, status ...configv1.ConditionStatus) bool { + for _, condition := range conditions { + if condition.Type == conditionType { + for _, s := range status { + if s == condition.Status { + return false + } + } + return true + } + } + return true +} diff --git a/vendor/k8s.io/apimachinery/pkg/api/equality/semantic.go b/vendor/k8s.io/apimachinery/pkg/api/equality/semantic.go new file mode 100644 index 00000000000..f02fa8e4340 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/equality/semantic.go @@ -0,0 +1,49 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package equality + +import ( + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" +) + +// Semantic can do semantic deep equality checks for api objects. +// Example: apiequality.Semantic.DeepEqual(aPod, aPodWithNonNilButEmptyMaps) == true +var Semantic = conversion.EqualitiesOrDie( + func(a, b resource.Quantity) bool { + // Ignore formatting, only care that numeric value stayed the same. + // TODO: if we decide it's important, it should be safe to start comparing the format. + // + // Uninitialized quantities are equivalent to 0 quantities. + return a.Cmp(b) == 0 + }, + func(a, b metav1.MicroTime) bool { + return a.UTC() == b.UTC() + }, + func(a, b metav1.Time) bool { + return a.UTC() == b.UTC() + }, + func(a, b labels.Selector) bool { + return a.String() == b.String() + }, + func(a, b fields.Selector) bool { + return a.String() == b.String() + }, +) From e17ba3c571ad80f27b39a6f53d44bcbd9401684a Mon Sep 17 00:00:00 2001 From: staebler Date: Fri, 25 Jan 2019 17:13:42 -0500 Subject: [PATCH 3/3] cmd: wait for the cluster to be initialized After creating the cluster, wait up to 30 minutes for the ClusterVersion object to indicate that the cluster has been initialized prior to exiting the installer. --- cmd/openshift-install/create.go | 55 ++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/cmd/openshift-install/create.go b/cmd/openshift-install/create.go index 1db7e8c2edb..75a26444c0e 100644 --- a/cmd/openshift-install/create.go +++ b/cmd/openshift-install/create.go @@ -13,12 +13,17 @@ import ( "github.com/spf13/cobra" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" + "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/clientcmd" + clientwatch "k8s.io/client-go/tools/watch" + configv1 "github.com/openshift/api/config/v1" + configclient "github.com/openshift/client-go/config/clientset/versioned" routeclient "github.com/openshift/client-go/route/clientset/versioned" "github.com/openshift/installer/pkg/asset" "github.com/openshift/installer/pkg/asset/cluster" @@ -30,6 +35,7 @@ import ( "github.com/openshift/installer/pkg/asset/templates" "github.com/openshift/installer/pkg/asset/tls" destroybootstrap "github.com/openshift/installer/pkg/destroy/bootstrap" + cov1helpers "github.com/openshift/library-go/pkg/config/clusteroperator/v1helpers" ) type target struct { @@ -107,6 +113,10 @@ var ( logrus.Fatal(err) } + if err := waitForInitializedCluster(ctx, config); err != nil { + logrus.Fatal(err) + } + consoleURL, err := waitForConsole(ctx, config, rootOpts.dir) if err != nil { logrus.Fatal(err) @@ -278,7 +288,50 @@ func destroyBootstrap(ctx context.Context, config *rest.Config, directory string return destroybootstrap.Destroy(rootOpts.dir) } -// waitForconsole returns the console URL from the route 'console' in namespace openshift-console +// waitForInitializedCluster watches the ClusterVersion waiting for confirmation +// that the cluster has been initialized. +func waitForInitializedCluster(ctx context.Context, config *rest.Config) error { + timeout := 30 * time.Minute + logrus.Infof("Waiting up to %v for the cluster to initialize...", timeout) + cc, err := configclient.NewForConfig(config) + if err != nil { + return errors.Wrap(err, "failed to create a config client") + } + clusterVersionContext, cancel := context.WithTimeout(ctx, timeout) + defer cancel() + + _, err = clientwatch.UntilWithSync( + clusterVersionContext, + cache.NewListWatchFromClient(cc.ConfigV1().RESTClient(), "clusterversions", "", fields.OneTermEqualSelector("metadata.name", "version")), + &configv1.ClusterVersion{}, + nil, + func(event watch.Event) (bool, error) { + switch event.Type { + case watch.Added, watch.Modified: + cv, ok := event.Object.(*configv1.ClusterVersion) + if !ok { + logrus.Warnf("Expected a ClusterVersion object but got a %q object instead", event.Object.GetObjectKind().GroupVersionKind()) + return false, nil + } + if cov1helpers.IsStatusConditionTrue(cv.Status.Conditions, configv1.OperatorAvailable) { + logrus.Debug("Cluster is initialized") + return true, nil + } + if cov1helpers.IsStatusConditionTrue(cv.Status.Conditions, configv1.OperatorFailing) { + logrus.Debugf("Still waiting for the cluster to initialize: %v", + cov1helpers.FindStatusCondition(cv.Status.Conditions, configv1.OperatorFailing).Message) + return false, nil + } + } + logrus.Debug("Still waiting for the cluster to initialize...") + return false, nil + }, + ) + + return errors.Wrap(err, "failed to initialize the cluster") +} + +// waitForConsole returns the console URL from the route 'console' in namespace openshift-console func waitForConsole(ctx context.Context, config *rest.Config, directory string) (string, error) { url := "" // Need to keep these updated if they change